noFieldError
A constant representing no validation errors.
This is used as a sentinel value to indicate that a field has passed validation and has no errors. It's more efficient than creating new empty FieldError instances.
Usage:
val validator: FieldValidator<String> = { value ->
if (value.isNotBlank()) noFieldError
else FieldError("Field is required")
}
Content copied to clipboard