Adding validation to the forms