NotEmpty
Validation that checks that a value is not empty. Values of type String, Collection, Array (and variants), Map, Table, and File are supported.
When the value being validated is empty, then an issue is emitted with the provided code (defaults to DEFAULT_CODE).
The Required validation should be preferred over this validation to semantically signal that a value is required. Otherwise, this validation should be used when:
The value is nullable and
nullvalues are accepted, but not empty values.The value is a File and empty files should not be accepted, since Required does not forbid empty files. To forbid both the
nullvalue and empty files, use Required together with NotEmpty.
Parameters
Issue code to use when the value is empty.
Severity of the issue emitted when the value is empty.
Constructors
Properties
Dependencies of the validation. Mapping of keys to the paths this validation depends on. Keys can be used within a ValidationContext to access the value of the dependencies.
Whether the form manager should reevaluate this validation whenever a descendant of the value being validated changes. This is false by default.
Set of external context dependencies of the validation.
Functions
Runs the validation within a ValidationContext containing the value being validated and the value of all declared dependencies. Returns a flow over all found issues.