Model Configuration
automaticValidations()
Signature
Section titled “Signature”automaticValidations() — returns void
Available in: model
Category: Validation Functions
Description
Section titled “Description”Whether or not to enable default validations for this model.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
value | boolean | yes | — | Set to true or false. |
Examples
Section titled “Examples”// 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);
}
}