Return to v1.4.5 docs

validatesPresenceOf()



Validates that the specified property exists and that its value is not blank.

Name Type Required Default Description
properties string Yes See documentation for validatesConfirmationOf.
message string No [property] can't be empty See documentation for validatesConfirmationOf.
when string No onSave See documentation for validatesConfirmationOf.
condition string No See documentation for validatesConfirmationOf.
unless string No See documentation for validatesConfirmationOf.
// Make sure that the user data can not be saved to the database without the `emailAddress` property. (It must exist and not be an empty string)
validatesPresenceOf("emailAddress");