lightweight form validation