added some field validations