client side form validation - very basic implementation