-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant add the tags automatically if its valid without entering key button like enter/tab etc #187
Comments
You can use th inputValue & onChangeInput to take care of this:
Then you have:
Then before you save:
|
I have applied the validation to the tags ie only email should be entered and because of this submit event is not getting called |
You could validate the tag in handleChangeInput.. Once it is a valid email, you push it into state.tags and clear state.tag. |
Now if we apply this on change input then if i want to type [email protected] regex validation will consider abc@co as valid and will as as tag and this will not allow user to type .com etc |
Then your regex isn't very good :)
Your regex should prevent abc@co because that's not a valid email address.
…On Mon, Mar 4, 2019 at 9:17 PM Abhay Bhosale ***@***.***> wrote:
Now if we apply this on change input then if i want to type ***@***.***
regex validation will consider ***@***.*** as valid and will as as tag and
this will not allow user to type .com etc
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#187 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGKHgRoN5ypmhrbKjRoHcjXKghjenViks5vTf3sgaJpZM4ZH2dP>
.
|
is there any autocomplete props for this so once user type valid email address and changes the focus ie on "submit button" it should add tag |
Can we add the tag if it is valid with the keys. ie normally it needs the key like comma or enter etc but is it possible to add the tag automatically if it is valid while typing.
Exp i am taking email ids and user can add them with by adding comma so on entering comma tags get added,but if they does not add comma then that value does not added as tag. It means they have to enter comma each time they enters values.
So i want to add the tags automatically if the entered value is valid email address.
The text was updated successfully, but these errors were encountered: