added client-side validation.
Merge branches 'client-validation' and 'master'