Download the PHP package hollodk/beastvalidator without Composer

On this page you can find all versions of the php package hollodk/beastvalidator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package beastvalidator

🐾 BeastValidator

npm minified size gzip size license GitHub last commit

A flexible, no-dependency JavaScript form validator built for modern forms with great UX.

πŸ”— Live Demo πŸ“ GitHub Repository

BeastValidator is built for developers who want clean, dependency-free form validation with a great user experience. Unlike bulky frameworks or config-heavy libraries, BeastValidator works directly with native HTML5 attributes and gives you full control β€” perfect for landing pages, modals, or dynamic UIs.


✨ Features


🚦 Quick Start (in 3 steps)

  1. Add your form

  2. Initialize BeastValidator

  3. Enjoy automatic validation!

πŸš€ Installation

βœ… CDN

πŸ“¦ NPM

πŸ”— NPM Package

🐘 Composer (PHP Projects)

πŸ”— Packagist Package

🧾 Manual Download

πŸ“¦ Module Mapping (for bundlers and CDNs)

If you're using a bundler, import BeastValidator from 'beastvalidator' will automatically resolve to the correct ESM build thanks to these fields in package.json:


πŸ§ͺ Example Usage

βœ… HTML Form

βœ… JavaScript Initialization


🧭 Step Wizard

Enable multi-step flow with initSteps: true. Sections are shown via data-step.

Add [data-next] and [data-prev] buttons to control flow. Enable with initSteps: true.

Wrap form sections with data-step="1", data-step="2", etc. Use:

HTML

JavaScript


πŸ“‘ API Submission (Optional)

You can use submitTo to automatically post the validated form data to an API endpoint, without writing your own fetch logic.


βš™οΈ Options

Option Type Default Description
errorContainerClass string 'beast-error-msg' Class name for inline errors
tooltipClass string 'beast-tooltip' Class name for tooltips
focusFirst bool true Scroll/focus first invalid field
validateOnChange bool true Validate on input and change events
tooltips string 'none' Tooltip position (top-left, top-right, top-center)
helperText bool true Show inline error below fields
shakeInput bool true Shake animation for invalid fields
waitForDom bool true Delay init until DOM is ready
setNoValidate bool true Disable native browser validation
autoSubmit bool true Auto submit form if valid
initSteps bool false Enable step/wizard mode
debug bool false Enable console logging
language string 'en' Language key from messages
theme string 'beast' beast, bootstrap, or none
errorSummaryTarget string null CSS selector for error summary
onInit func null Callback after init
onFail func null Callback with invalid fields
onSuccess func null Callback on valid form
submitTo object null Automatically submit to an API endpoint { url, method, headers, debug }

πŸ“Œ Supported data-* Attributes

Attribute Example Description
data-min 2 Min checkboxes or min value
data-max 6 Max numeric value
data-min-age 18 Minimum age in years
data-max-age 100 Maximum age in years
data-password-strength strong Enforce password complexity (weak, medium, strong)
data-sleep 1.5 Delay in seconds
data-match password Match field name
data-validator checkUsername Custom validator name
data-error-message Field required Override default message
data-error-container #myErrorBox Place error message in custom container

πŸ“Œ Supported Attributes

Attribute Example Description
pattern [A-Z]{2} Custom regex format
minlength 6 Min charaters in form
maxlength 2 Max characters in form

🎨 Styling

Add your own styles or override defaults:


πŸ“š Public API

✨ Custom Field Validator Example


🌐 Custom Language Messages


🧩 Build Variants Overview

File Format Use Case
dist/validate.esm.js ESM βœ… Modern bundlers like Vite, Webpack, Rollup, etc.
dist/validate.umd.js UMD βœ… For inclusion via <script> in a browser (dev mode)
dist/validate.min.js UMD (minified) βœ… Production-ready browser version or CDN like jsDelivr

🧠 When to Use Which

1. πŸ›  Vite/Webpack/Rollup (Modern JavaScript Apps)

Use: dist/validate.esm.js

Why: This is an ES module (ESM) file optimized for modern JavaScript tooling. It supports tree-shaking and integrates cleanly into apps built with frameworks like React, Vue, Svelte, or Alpine.

2. 🌐 Browser via <script> (Vanilla Sites or CMS like WordPress)

Use: dist/validate.min.js

Why: This is a minified UMD build that exposes BeastValidator globally via window.BeastValidator. Ideal if you're using BeastValidator directly in a browser without any build step.

3. πŸ€“ For Debugging in Browser Without Build Tools

Use: dist/validate.umd.js

Why: This is the non-minified UMD build, useful for debugging or exploring how BeastValidator works in browser developer tools.


❓ FAQ

How do I validate only part of the form?

Use validateField() or validateCurrentStep().

Can I skip auto-submission?

Yes! Set autoSubmit: false and handle submission in onSuccess().

Does it work in React/Vue?

Yes, if you attach BeastValidator to a raw DOM node using ref.

Can I use it in modals or dynamic content?

Yes. Make sure to call new BeastValidator() after the form appears in the DOM.

Can I use BeastValidator without defining validation in JavaScript?

Yes! One of BeastValidator’s core strengths is that it leverages native HTML5 attributes like required, pattern, minlength, maxlength, type=email, and custom data-* attributes for validation logic. You don’t need to define a separate JS config.

Can I delay validation (e.g., to simulate an async check)?

Yes. Use the data-sleep="1" attribute to pause validation for X seconds before checking the value. Useful for async debouncing.

How can I debug what’s happening?

Set debug: true to get verbose console logging of all key lifecycle events:


βœ… Roadmap


🀝 Contributing

We love contributions!

  1. Fork the repo
  2. Create a new branch
  3. Write clean vanilla JS
  4. Submit a PR πŸš€

🌍 Browser Support


πŸ“„ License

MIT β€” Free for personal & commercial use


πŸ‘¨β€πŸ’» Author

Made with πŸ’› by @hollodk πŸ”— Demo πŸ“ Repository


All versions of beastvalidator with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hollodk/beastvalidator contains the following files

Loading the files please wait ...