Skip to content

Model Configuration

automaticValidations()

automaticValidations() — returns void

Available in: model Category: Validation Functions

Whether or not to enable default validations for this model.

NameTypeRequiredDefaultDescription
valuebooleanyes—Set to true or false.
// 1. Disable automatic validations for this model (useful when automatic validations are enabled globally but you want to opt out for a specific model).
component extends="Model" {
	function config() {
		automaticValidations(false);
	}
}

// 2. Explicitly enable automatic validations for this model (useful when automatic validations are disabled globally but you want to opt in for a specific model).
component extends="Model" {
	function config() {
		automaticValidations(true);
	}
}