Closed wellemut closed 1 year ago
for the email validation I use the isemail package. and before passing the values I trim the strings which means removing spaces from the beginning and the end of the email then checking for the validations. should i keep the extra spaces before passing the string to the validation function? or for better understanding could you please comment more test cases that what templates should pass and which ones should fail?
here is the reference for isemail email validation of entries email validation of events
I think you should take whatever the users entered and pass it to the validation.
Because if somebody writes
Private user@server.org Wien
And you test in isemail
Privateuser@server.orgWien
Than you don't get an error although it's stupid.
Ich think better just visually indicate a problem. If possible you can also add explainations under the field. I e.: No spaces allowed
Frontend trims spacing form mail and website automatically
Problem
One of the most common errors is, that user write additional word/explanation in the field of email or website
Solution
Show the field text in red, as long as it contains spaces or strange sings...
This is needed independently how far the backend can trim wrong content: Related to: https://github.com/kartevonmorgen/openfairdb/issues/393