You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
Hello,
I did not find a way to check the data sent from the comment form before it's registered, like if all fields are filled, if the email adress is a valid format, etc. And show an error message if not.
I saw that i'ts throw an error exception if a field is empty, but what I want is just show the error to the users and keep the form + the data already filled.
Is there a way to do that? Thanks !
The text was updated successfully, but these errors were encountered:
Quite a few of these should actually be caught by the form's HTML validation (e.g. the type="email" input field instructs the browser to check validity and output an error message instead of submitting, if needed). For required fields, the required attribute in the form should similarly trigger an error in the browser instead of submitting an empty field.
But this indeed does not catch everything and backend validation would be neat to have. Anecdotally (mostly documenting this as a note-to-self here), there is even some built-in validation stub for the text field present in the code (here), but it is not currently returned to the frontend (because here).
The first beta of Commentions v2.0 moves the form validation from frontend to backend, adding more useful user feedback and various customisation options.
Still ironing out a few details, but if you are interested feel free to try it; feedback is of course most welcome 🙂
@yoanmalie I hope you don't mind me pinging you here in a slightly off-topic manner, but I'd like to draw your attention to my update that I am no longer able to maintain the Commentions plugin in the future → details here.
Hello,
I did not find a way to check the data sent from the comment form before it's registered, like if all fields are filled, if the email adress is a valid format, etc. And show an error message if not.
I saw that i'ts throw an error exception if a field is empty, but what I want is just show the error to the users and keep the form + the data already filled.
Is there a way to do that? Thanks !
The text was updated successfully, but these errors were encountered: