MCPcopy
hub / github.com/django/django / validate

Method validate

django/contrib/auth/password_validation.py:107–113  ·  view source on GitHub ↗
(self, password, user=None)

Source from the content-addressed store, hash-verified

105 self.min_length = min_length
106
107 def validate(self, password, user=None):
108 if len(password) < self.min_length:
109 raise ValidationError(
110 self.get_error_message(),
111 code="password_too_short",
112 params={"min_length": self.min_length},
113 )
114
115 def get_error_message(self):
116 return (

Callers 1

validate_passwordFunction · 0.45

Calls 2

get_error_messageMethod · 0.95
ValidationErrorClass · 0.90

Tested by

no test coverage detected