def __init__(
            self,
            details,
            max_value=None,
            min_value=None,
            **kwargs
    ):
        """Initialize field definition and attach default validators."""
        super().__init__(details, **kwargs)

        self.max_value = max_value
        self.min_value = min_value

        if max_value is not None:
            self.validators.append(max_validator(max_value))
        if min_value is not None:
            self.validators.append(min_validator(min_value))
def __init__ ( self , details , max_value = None , min_value = None , ** kwargs ) : super ( ) . __init__ ( details , ** kwargs ) self . max_value = max_value self . min_value = min_value if max_value is not None : self . validators . append ( max_validator ( max_value ) ) if min_value is not None : self . validators . append ( min_validator ( min_value ) )
Initialize field definition and attach default validators.