Model Configuration Validation Functions void model
Validates that the value of the specified property also has an identical confirmation value.
This is common when having a user type in their email address a second time to confirm, confirming a password by typing it a second time, etc.
The confirmation value only exists temporarily and never gets saved to the database.
By convention, the confirmation property has to be named the same as the property with "Confirmation" appended at the end.
Using the password example, to confirm our password property, we would create a property called
|properties||string||No||Name of property or list of property names to validate against (can also be called with the
|message||string||No||[property] should match confirmation||Supply a custom error message here to override the built-in one.|
|condition||string||No||String expression to be evaluated that decides if validation will be run (if the expression returns
|unless||string||No||String expression to be evaluated that decides if validation will be run (if the expression returns
|caseSensitive||boolean||No||false||Ensure the confirmed property comparison is case sensitive|
// Make sure that the user has to confirm their password correctly the first time they register (usually done by typing it again in a second form field) validatesConfirmationOf(property="password", when="onCreate", message="Your password and its confirmation do not match. Please try again.");