Function setValidationMode