Harmonize validation of user data on both client and server side