week4-form-validation: refactored