Hi, I can provide you the mechanism you need for your form, but my suggestion would be having a server-side validation as well, because of security issues: we can think about doing that on the server, instead of javascript, or doing in both ways if u also want to show it to the user.
Hope to hear you soon,
Alex