Added both, client-side and server-side validation.