Validate email input field form element
How can I validate multiple email addresses separated by commas with react-hook-form? I have a Material UI text field that uses react-hook-form for validation. Initially the input field takes a single email and it's being validated by the react-hook-form. Currently I want the user to be able to enter multiple emails separated by commas and also validate each one of them. What I'm able to do is validate when the user clicks on submit, but I want to be able to validate when the user is typing the emails. <TextField onChange={(e) => { validateRecipientEmail(e.target.value); }} name='recipientEmai
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.