Added validation to the forms