1. Go to this page and download the library: Download crocodile2u/validity library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
Field::int("subscriptions", "{label}: value #{key} is not an integer")
->setMin(1, "Subscriptions: value #{key} must be greater then or equal to {min}")
->expectArray()
->setArrayKeyOffset(1);
Field::string("email")->addCallbakRule(new EmailAddress(), "Email is invalid!");
Field::string("email")->addCallbakRule(function($value) {
return (new EmailValidator())->validate($value);
}, "Email is invalid!");
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.