def RegisterValidator(flag_name, checker, message='Flag validation failed', flag_values=FLAGS):
 flag_values.AddValidator(gflags_validators.SimpleValidator(flag_name, checker, message))

def RegisterValidator ( flag_name , checker , message = 'Flag validation failed' , flag_values = FLAGS ) : flag_values . AddValidator ( gflags_validators . SimpleValidator ( flag_name , checker , message ) )
adds a constraint .