validations of the fields
fixing variable type