A simple JS utility for validating forms.