title: Custom validator in python-attrs with extra parameters
body: <p>I have several classes defined using attrs like this one:</p>
  
  <pre><code>from attr import attrs, attrib, validators
  
  @attrs
  class MyClass:
      name = attrib(])
      @name.validator
      def check_length(self, attribute, value):
          if not (3 &lt;= len(value) &lt;= 30):
              raise ValueError("Name must be between 3 and 30 characters")
  
      description = attrib()
      @description.validator
      def check_length(self, attribute, value):
          if not (10 &lt;= len(value) &lt;= 400):
              raise ValueError("Description must be between 10 and 400 characters")
  </code></pre>
  
  <p>For several attributes I need to create a validator to check wether the data it's in some range. I want to avoid repetition, so I can create a custom validator where I pass some extra arguments for min and max, like this one:</p>
  
  <pre><code>def range_validator(instance, attribute, value, min_value, max_value):
      if  min_value &gt;= len(value) &gt;= max_value:
          raise ValueError("Must be between {} and {}".format(min_value, max_value))
  </code></pre>
  
  <p>But then I don't know how to call this validator from inside attrib() passing the extra args (min_value and max_value), I mean do something like:</p>
  
  <pre><code>name = attrib(validator=[range_validator(self, 10, 30)])
  </code></pre>