Module to submit a form via ajax and do a basic validation