1.I need to allow maximum of 5 emails in email field on edit as part of UI validation.
2.It should take all emails separated by ;
3.All emails should be under specific domain.
4.Looking in JavaScript or in ReactJS.
1.I need to allow maximum of 5 emails in email field on edit as part of UI validation.
2.It should take all emails separated by ;
3.All emails should be under specific domain.
4.Looking in JavaScript or in ReactJS.
You can try something like this...
function checkValid(inputText) {
if (
inputText.split(";").length > 5 ||
inputText.split(";").length !== inputText.split("@specific.domain").length - 1
) {
// Show error
} else {
// Process emails
}
}