Created
April 6, 2014 20:51
-
-
Save anonymous/10011329 to your computer and use it in GitHub Desktop.
User.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User extends ActiveRecord\Model { | |
static $validates_presence_of = [ | |
['nome', 'message' => 'deve ser fornecido!'], | |
['telefone', 'message' => 'deve ser fornecido!'] | |
]; | |
public function validate() { | |
if($this->email == 'rod') { | |
$this->errors->add('email', 'this is not working'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment