Ciao, la soluzione javascript è spesso in uso perche' piu' pratica e rapida lato client quindi lato utente. Che ci sia questa o meno e' comunque buona cosa avere un controllo poi anche lato server dato che lato client un utente esperto potrebbe anche riuscire a bypassarla. Gli attributi quindi possono già essere un plus d'aiuto decente oppure potresti aggiungere un plugin più completo tipo http://parsleyjs.org/doc/examples.html