Added basic client-side validation