Download the PHP package bdbch/vivalidator without Composer
On this page you can find all versions of the php package bdbch/vivalidator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bdbch/vivalidator
More information about bdbch/vivalidator
Files in bdbch/vivalidator
Package vivalidator
Short Description Data validation library for simple input validations
License MIT
Informations about the package vivalidator
Vivalidator
A simple and easy input and data validation library
Why?
I dislike the way of using Wordpress Plugins or heavy PHP packages for form development when it comes to Wordpress forms. I hate when third party code adds markup to your page or narrows my possibilites because of some restrictions coming with the external code. Thats why I started looking for easy to use validation frameworks but didn't find anything that perfectly fits my needs. This is why I started development on Vivalidator.
Installation
The Composer Way
Run composer require bdbch/vivalidator
in your project folder to install Vivalidator via Composer. It will be automatically placed into your autoload.
Manual Way
Make sure to have all necessary files copied manually into your project. Require the desired library from the src
folder in your code to get access to a Vivalidator Class.
Usage
Using the Validator is simple. Check out this example code to get an idea on how to use this feature.
Adding ReCaptcha
Vivalidator now has ReCaptcha Support! Just specify your Secret Key and the Error String as extra data to configure it right away! Make sure to have the ReCaptcha library installed manually or via composer require google/recaptcha
.
Rules
required
- Checks if the input is not emptyminlength
- Checks if the input is longer than a specific valuemaxlength
- Checks if the input is lower than a specific valueemail
- Checks if the input is a valid emailurl
- Checks if the input is an URLnumber
- Checks if the input is a numbermin
- Checks if the input is higher than the defined valuemax
- Checks if the input is lower than the defined valuebetween
- Checks if the input is between two numbers (combination of max and min)regex
- Checks if the input matches a specified regex
Planned Rules
See this issue to learn more
Contribution
I'm open for pull requests and would love to see some support. I'm not the 100% best PHP developer and would love to get this Flynt feature even better so we're not bound to damn Wordpress Plugins anymore.
License
This is licensed under the MIT license.