add validation to main form