some client code; server side validation