Lustra::Model::HasValidation
Inherits Lustra::Validation::Helper
Instance methods
error?
Return true if saving has been declined because of validation issues.
The error list can be found by calling Lustra::Model#errors
valid!
Check whether the model is valid. If not, raise InvalidModelError.
Return the model itself
validate
This method is called whenever valid? or save is called.
By default, validate is empty and must be overriden by your own validation code.