woody1990 Posted April 5, 2016 Share Posted April 5, 2016 Anyone had any luck with model validation, I have followed this example - Removed - with no luck. Had run into a few issues trying to find validator and ended up using validation instead use WHMCS\Input\Validation\Validation as Validation; use WHMCS\Validate as Validate; class myclass extends Fieldvalidator{ private $errors; private $rules = array( 'name' => 'required|min:2' ); public function validate($data) { $val = new Validate; $isValid = $val->validate($data,$this->rules); if($isValid != true) { echo 'failed'; } } } Any one got any advice or have had luck with this 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.