@@ -93,6 +93,12 @@ The validator should be applied to *serializer classes*, like so:
...
@@ -93,6 +93,12 @@ The validator should be applied to *serializer classes*, like so:
)
)
]
]
---
**Note**:The `UniqueTogetherValidation` class always imposes an implicit constraint that all the fields it applies to are always treated as required. Fields with `default` values are an exception to this as they always supply a value even when omitted from user input.
---
## UniqueForDateValidator
## UniqueForDateValidator
## UniqueForMonthValidator
## UniqueForMonthValidator
...
@@ -146,6 +152,10 @@ If you want the date field to be entirely hidden from the user, then use `Hidden
...
@@ -146,6 +152,10 @@ If you want the date field to be entirely hidden from the user, then use `Hidden
---
---
**Note**:The `UniqueFor<Range>Validation` classes always imposes an implicit constraint that the fields they are applied to are always treated as required. Fields with `default` values are an exception to this as they always supply a value even when omitted from user input.
---
# Writing custom validators
# Writing custom validators
You can use any of Django's existing validators, or write your own custom validators.
You can use any of Django's existing validators, or write your own custom validators.