Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected $rules = array(
- 'mobile_number' => 'phone:AUTO,mobile,:country_code'
- );
- if(!$this->some_validator->with($data)->passes()){
- // Get the validation errors and throw the exception
- $error_info = $this->some_validator->formatErrorMessages();
- throw new ExampleException(ExampleExceptionType::$VALIDATION_ERROR,$error_info);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement