client-side required field check