Raising a Warning From a Validation Rule Instead of an Error
When your validation rule returns false, it causes a validation error that stops normal processing.
If instead you want to show the user a warning that does not prevent the data from
being saved successfully, then your rule can signal a warning and then return
true
.
For example, your validation rule would look like this:
// if the discount is over 50%, give a warning
if (Discount > 0.50) {
// raise a warning using the default declarative error message
adf.error.warn(null)
}
return true