PHP code example of bbear / mvalidate

1. Go to this page and download the library: Download bbear/mvalidate 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/ */

    

bbear / mvalidate example snippets


class BaseCtl extends \MValid\Model{}

//这里的info ,用load的第二个参数控制 , 默认是 BaseCtl(类名)
$_POST['info']['email'] = '[email protected]';
   var_dump($a->getErrors());
}
var_dump($a->getAttributes());