attribute.isValid (Client API reference)
Returns a boolean value to indicate whether the value of a column is valid.
Column types supported
All
Syntax
formContext.getAttribute(arg).isValid();
Return Value
Type: Boolean
Description: true
if the column value is valid; false
otherwise.
The validity logic uses the properties of the Dataverse column. Each type of column might have properties that limit valid values.
For example, a Whole Number column uses the IntegerAttributeMetadata class that provides the MaxValue and MinValue properties. These properties are editable in the column definition in Power Apps designer as Maximum value and Minimum value respectively.
If a Whole Number column has Maximum value of 0 and Minimum value of 100, the isValid
function returns false
when the current unsaved value on the form is 1000 and true
whenever the current value falls between 0 and 100.