Form custom validation

Hey everyone,

I might have completely missed it but I can not find best practices around custom validations for forms.

Let’s say I want a sign-up page where I want the user to pick a username. The username must be unique and between 5 and 15 characters.
For checking if a user is unique, I am currently doing a search on the username field which works.

However, I am not sure of the following:

What is the best way to:

  • Prompt an error message to the user (I currently have a text which is by default to not visible, if the input does not meet the required validation, it is shown)
  • Do validation on the client side
  • Most importantly validate the data on the server side

Would the custom states work correctly for this? I was not sure that this would also help to validate the data on the server side.
I also would like if possible to repeat the validation multiple times.

Thanks a lot!

This topic was automatically closed after 70 days. New replies are no longer allowed.