def validate_category(value):
 if (value not in settings.NODE_CATEGORY_MAP.keys()):
  raise ValidationValueError('Invalid value for category.')
 return True

def validate_category ( value ) : if ( value not in settings . NODE_CATEGORY_MAP . keys ( ) ) : raise ValidationValueError ( 'Invalid value for category.' ) return True
validator for node#category .