Input
A user input. An input can have 3 states:
Invalid: input contains validation errors listed in the Input.Invalid.errors field.
Valid: an input that has been validated and is considered valid
Empty: an input that has either a default value, an empty value, or has never been validated. How you want to handle Empty values depends on the business logic of your app.
Inheritors
Properties
Whether this is Input.Empty
Whether the actual string of this Input is blank
Whether this is Input.Invalid
Whether this is Input.Valid
Whether this Input is valid or empty
Functions
Applies an additional Rules.Equals to this input, then appends the result of the validation to other validation errors present, if any. Allows to create an Input that must always match some other one Don't forget to run the validation on both the dependent and the original inputs when any of them changes.
Returns Input.value if it is valid, otherwise an empty string
Returns Input.value if it is valid, otherwise null
Returns null if this Input is not valid, otherwise returns Input.value