You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(textinput): do not block input on validation (charmbracelet#185)
* feat(textinput): do not block input on validation
This PR builds upon the excellent work in charmbracelet#167 and charmbracelet#114 and makes a
breaking change to the validation API.
Currently, validation will completely block text input if the Validate
function returns an error. This is now changed so the function no longer
blocks input if this is the case, thus handing this responsibility to
the clients.
This is helpful for cases where the user is requested to type an
existing system path, and the Validate function keeps asserting the
existence of the path. With the current implementation such a validation
is not possible.
For example:
> /
Err: nil
> /t
Err: /t: No such file or directory
> /tm
Err: /tm: No such file or directory
> /tmp
Err: nil
* fix: change name
---------
Co-authored-by: Maas Lalani <[email protected]>
0 commit comments