MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / validate

Method validate

web/pgadmin/authenticate/internal.py:47–62  ·  view source on GitHub ↗
(self, form)

Source from the content-addressed store, hash-verified

45 pass
46
47 def validate(self, form):
48 username = form.data['email']
49 password = form.data['password']
50
51 if username is None or username == '':
52 form.email.errors = list(form.email.errors)
53 form.email.errors.append(gettext(
54 self.messages('EMAIL_NOT_PROVIDED')))
55 return False, None
56 if password is None or password == '':
57 form.password.errors = list(form.password.errors)
58 form.password.errors.append(
59 self.messages('PASSWORD_NOT_PROVIDED'))
60 return False, None
61
62 return True, None
63
64 def login(self, form):
65 username = form.data['email']

Callers

nothing calls this directly

Calls 3

messagesMethod · 0.95
gettextFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected