class MyRecord(Record): id = Field( type=text_type, coerce=SourceCodeTemplate( '$upper({})', upper=lambda s: s.upper(), ), )
class MyRecord(Record): # pylint: disable=unused-variable id = Field( type=text_type, check=SourceCodeTemplate( '$isupper({0})', isupper=lambda s: s == s.upper(), ), )
class MyRecord(Record): # pylint: disable=unused-variable id = Field( type=text_type, coerce=SourceCodeTemplate( '$upper({},{})', upper=lambda s: s.upper(), ), )
class MyRecord(Record): id = Field( type=int, check=SourceCodeTemplate( '$single_digit({})', single_digit=lambda v: 0 <= v < 10, ), )