Skip to content

Instantly share code, notes, and snippets.

@evaldosantos
Created April 1, 2014 15:58
Show Gist options
  • Save evaldosantos/9917112 to your computer and use it in GitHub Desktop.
Save evaldosantos/9917112 to your computer and use it in GitHub Desktop.
public function isValid(){
if(!isset(Thread::$rules)
return true;
$validator = Validator::make(
$this->attributes,
static::$rules
);
if(Validator->fails())
{
$this->errors = $validator->errors();
return false;
}
else
{
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment