db.models.Model.clean_fields()

Model.clean_fields(exclude=None) [source]

This method will validate all fields on your model. The optional exclude argument lets you provide a list of field names to exclude from validation. It will raise a ValidationError if any fields fail validation.

The second step full_clean() performs is to call Model.clean(). This method should be overridden to perform custom validation on your model.

doc_Django
2016-10-09 18:35:53
Comments
Leave a Comment

Please login to continue.