isValid abstract method

bool isValid(
  1. Object? value
)

Whether value satisfies the constraint; the method a custom constraint implements.

For a property constraint value is the property value (often null: return true for it unless the rule is about presence); for a class-level constraint it is the annotated object itself.

Implementation

bool isValid(Object? value);