Package spammcan :: Package forms :: Module validators :: Class ValidModelValue
[hide private]

Class ValidModelValue

source code

                        object --+            
                                 |            
formencode.declarative.Declarative --+        
                                     |        
              formencode.api.Validator --+    
                                         |    
             formencode.api.FancyValidator --+
                                             |
                                            ValidModelValue
Known Subclasses:

Check if given value is a valid key to an existing model object.

**Messages**

``badType``:
  The input must be a string (not a ``%(type)s``: ``%(value)r``)

``empty``:
  Please enter a value

``noneType``:
  The input must be a string (not None)

``notExistant``:
  There is no ``%(class_)s`` with the ``%(name)s`` '``%(value)s``'.

Nested Classes [hide private]

Inherited from formencode.api.FancyValidator: if_empty, if_invalid, if_invalid_python

Inherited from formencode.api.Validator: if_missing

Inherited from formencode.declarative.Declarative: __metaclass__

Instance Methods [hide private]
 
_to_python(self, value, state) source code

Inherited from formencode.api.FancyValidator: assert_string, base64encode, empty_value, from_python, is_empty, to_python, validate_other, validate_python

Inherited from formencode.api.FancyValidator (private): _validate_noop

Inherited from formencode.api.Validator: __init__, all_messages, message, subvalidators

Inherited from formencode.declarative.Declarative: __call__, __initargs__, __repr__, __sourcerepr__

Inherited from formencode.declarative.Declarative (private): _source_repr_class

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Methods [hide private]

Inherited from formencode.api.Validator (private): _initialize_docstring

Inherited from formencode.declarative.Declarative: __classsourcerepr__, singleton

Static Methods [hide private]

Inherited from formencode.api.Validator: __classinit__

Inherited from formencode.declarative.Declarative (private): _repr_vars

Class Variables [hide private]
  class_ = None
  attr = 'id'
  name = 'value'
  convert_value = True
  messages = {'notExistant': u"There is no %(class_)s with the %...
  _messages = {'badType': 'The input must be a string (not a %(t...
  declarative_count = 113

Inherited from formencode.api.FancyValidator: accept_python, not_empty, strip

Inherited from formencode.api.FancyValidator (private): _from_python

Inherited from formencode.api.Validator: __singletonmethods__, compound, gettextargs, repeating, use_builtins_gettext

Inherited from formencode.declarative.Declarative: __mutableattributes__, __unpackargs__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_to_python(self, value, state)

source code 
Overrides: _to_python

Class Variable Details [hide private]

messages

Value:
{'notExistant': u"There is no %(class_)s with the %(name)s '%(value)s'\
."}

_messages

Value:
{'badType': 'The input must be a string (not a %(type)s: %(value)r)',
 'empty': 'Please enter a value',
 'noneType': 'The input must be a string (not None)',
 'notExistant': u'There is no %(class_)s with the %(name)s '%(value)s'\
.'}