Raxol.Components.Input.TextInput.Validation (Raxol v0.3.0)
View SourceHandles input validation for the TextInput component. This includes length validation, pattern matching, and error message generation.
Summary
Functions
Validates the input value against the component's constraints. Returns a new state with any validation errors.
Validates a value's length against a maximum. Returns :ok if valid, {:error, reason} if invalid.
Validates a value against a pattern. Returns :ok if valid, {:error, reason} if invalid.
Checks if adding text would exceed the maximum length.
Functions
Validates the input value against the component's constraints. Returns a new state with any validation errors.
Validates a value's length against a maximum. Returns :ok if valid, {:error, reason} if invalid.
Validates a value against a pattern. Returns :ok if valid, {:error, reason} if invalid.
Checks if adding text would exceed the maximum length.