A simple JavaScript form validator