PHP code example of softxpert / magento1-validator
1. Go to this page and download the library: Download softxpert/magento1-validator 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/ */
softxpert / magento1-validator example snippets
// Create an instance of the validator model
/** @var Softxpert_Validator_Model_Validator $validator */
$vaidator = Mage::getModel('softxpert_validator/validator');
// Preparing validator with data and rules arrays
$data = $this->getRequest->getParams();
$rules = [
'username' => '