Hi Team ,
I need to set up a server side validation where in when user click on submit in a form without filling the mandatory fields , an error message should occur.
form fields :- Name , Address, city -> mandatory fields
step by step validation -> if name filed is blank then it should show Enter name
if name and city is blank - then it should validate one by one , first it should show enter name , after that it should show enter city ..
please help me
Hi Shain,
If you submit a form without filling the mandatory fields, a message will appear.
You should set up some custom client-side validations where you verify all those fields with built-on validations.
Check more information about Form Validations here.
If you have more questions, let me know.
Regards,
Diogo Reis
Hello Shain,
In a Reactive App, you have the option to use Client-side validation to make sure certain inputs are not empty, in your example, you can ensure that the Name, City, and Address are filed.
If you still prefer Server-side validation you must disable the built-in validations option on the form button.
and create an Action to validate your data on the server, this should include a way to send any errors back .
I'm attaching an oml with an example of Server-side and client-side validations with custom errors messages.
Hope it helps!
Paulo Rosário