Change the way to validate form.