Saturday, April 20, 2013

YII model with some action perform

Add custom error to a model:
$model->addError('email', 'No valid account associated with this email address.');

Validate a model:
$model->validate();

No comments:

Post a Comment