Fixes tiny documentation error. Adds possibility to add custom validation methods to fields, e. g.:
class Customer(Document):
        country = StringField(validation=lambda value: value in ['DE', 'AT', 'CH'])
Replaced some str() with unicode() for i18n reasons.
			
			
This commit is contained in:
		| @@ -22,7 +22,7 @@ objects** as class attributes to the document class:: | ||||
|      | ||||
|     class Page(Document): | ||||
|         title = StringField(max_length=200, required=True) | ||||
|         date_modified = DateTimeField(default=datetime.now) | ||||
|         date_modified = DateTimeField(default=datetime.datetime.now) | ||||
|  | ||||
| Fields | ||||
| ====== | ||||
|   | ||||
		Reference in New Issue
	
	Block a user