add( 'email', new EmailValidator( [ 'model' => $this, 'message' => 'Please enter a correct email address', ] ) ); return $this->validate($validator); } /** * Initialize method for model. */ public function initialize() { $this->setSchema("public"); } /** * Returns table name mapped in the model. * * @return string */ public function getSource() { return 'users'; } /** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters * @return Users[]|Users */ public static function find($parameters = null) { return parent::find($parameters); } /** * Allows to query the first record that match the specified conditions * * @param mixed $parameters * @return Users */ public static function findFirst($parameters = null) { return parent::findFirst($parameters); } }