PHP code example of innoweb / silverstripe-form-validation
1. Go to this page and download the library: Download innoweb/silverstripe-form-validation 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/ */
innoweb / silverstripe-form-validation example snippets
class ValidationExtension extends Extension
{
// needs to be run on base FormField class, otherwise it's not going to be loaded on time
public function addCustomValidatorScripts() {
Requirements::javascript(
'your/custom/field-validation.js'
);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.