Skip to content

How to validate minimum length with bubbles/textinput? #289

Answered by bashbunni
erwin asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @erwin,

You can definitely do validation and throw errors at any point. You just need to add a helper function to add whatever specifics you're looking for. I created a gist to show you. You can call the min length validation when the user hits enter, which is how they would indicate "done" with a field. From there you could use the result to block them from going to the next field, or just show the error message and do nothing, which is what I've done in the Gist for simplicity's sake.

https://gist.github.com/bashbunni/fed91563900a9f6e20cde881fe68ac31

I hope that helps. Let us know if you're still unsure or if there's a part of the question I missed.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bashbunni
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants