class documentation

class UniqueValidator: (source)

View In Hierarchy

Validator that corresponds to `unique=True` on a model field. Should be applied to an individual field on the serializer.

Method __call__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method exclude_current_instance If an instance is being updated, then do not include that instance itself as a uniqueness conflict.
Method filter_queryset Filter the queryset to all instances matching the given attribute.
Class Variable requires_context Undocumented
Instance Variable lookup Undocumented
Instance Variable message Undocumented
Instance Variable queryset Undocumented
def __call__(self, value, serializer_field): (source)

Undocumented

def __init__(self, queryset, message=None, lookup='exact'): (source)

Undocumented

def __repr__(self): (source)

Undocumented

def exclude_current_instance(self, queryset, instance): (source)

If an instance is being updated, then do not include that instance itself as a uniqueness conflict.

def filter_queryset(self, value, queryset, field_name): (source)

Filter the queryset to all instances matching the given attribute.

requires_context: bool = (source)

Undocumented

Undocumented

Undocumented

queryset = (source)

Undocumented