Create Dataset: email validation does not match validation in the Dataverse API
Closed this issue · 2 comments
ekraffmiller commented
What steps does it take to reproduce the issue?
Go to Create Dataset form, in Point of Contact email, enter an email address that ends with a non-tld string, for example, 'ellen@test.e' and all the other required fields
- When does this issue occur?
When submitting Create Dataset form - Which page(s) does it occur on?
Create Dataset - What happens?
It shows an Alert message about a validation error, but it doesn't say what the error is, and the email field isn't highlighted
In the Network tab, the create fails with 403 and this error message:
{
"status": "ERROR",
"message": "Validation Failed: Point of Contact E-mail ellen@test.e is not a valid email address. (Invalid value:edu.harvard.iq.dataverse.DatasetFieldValueValue[ id=null ]).java.util.stream.ReferencePipeline$3@626c7975"
}
pdurbin commented
Just a couple details from Slack:
- On the backend we use https://github.com/apache/commons-validator
- Perhaps
.e
is rejected because it isn't a valid TLD according to https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains or http://www.iana.org/domains/root/db
g-saracca commented
Waiting for Dynamic Multiple Fields PR to be merged.
In the above-mentioned pr, there are some changes and refactor that could be better to wait until keep working on this issue to avoid lots of merging conflicts.