Reputation: 1991
I am using Apache's Email Validator to validate the customer's input.
I've found an issue where, if the customer inputs more than 100 characters, I get the following error
This is my code:
if (!EmailValidator.getInstance().isValid(email)) {
// ...
}
Any ideas what the problem is, and why the validator isn't able to handle this scenario with 100+ characters?
Upvotes: 0
Views: 337
Reputation: 1991
After digging, I found that there is a known error in Apache's EmailValidator. https://issues.apache.org/jira/browse/VALIDATOR-365
The best solution seems to be restricting the field to the max length that the validator allows.
Upvotes: 2