Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. protected $rules = array(
  2. 'mobile_number' => 'phone:AUTO,mobile,:country_code'
  3. );
  4.  
  5. if(!$this->some_validator->with($data)->passes()){
  6.  
  7. // Get the validation errors and throw the exception
  8. $error_info = $this->some_validator->formatErrorMessages();
  9. throw new ExampleException(ExampleExceptionType::$VALIDATION_ERROR,$error_info);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement