l.a.v.validation : module documentation

Part of lp.app.validators

No module docstring
Function can_be_nominated_for_series Can the bug be nominated for these series?
Function valid_bug_number Undocumented
Function valid_cve_sequence Check if the given value is a valid CVE otherwise raise an exception.
Function validate_new_team_email Check that the given email is valid and not registered to
Function validate_new_person_email Check that the given email is valid and not registered to
Function validate_date_interval Check if start_date precedes end_date.
Function _validate_email Undocumented
Function _check_email_availability Undocumented
def can_be_nominated_for_series(series):
Can the bug be nominated for these series?
def valid_bug_number(value):
Undocumented
def valid_cve_sequence(value):
Check if the given value is a valid CVE otherwise raise an exception.
def _validate_email(email):
Undocumented
def _check_email_availability(email):
Undocumented
def validate_new_team_email(email):
Check that the given email is valid and not registered to another launchpad account.
def validate_new_person_email(email):
Check that the given email is valid and not registered to another launchpad account.

This validator is supposed to be used only when creating a new profile using the /people/+newperson page, as the message will say clearly to the user that the profile they're trying to create already exists, so there's no need to create another one.

def validate_date_interval(start_date, end_date, error_msg=None):

Check if start_date precedes end_date.

>>> from datetime import datetime
>>> start = datetime(2006, 7, 18)
>>> end = datetime(2006, 8, 18)
>>> validate_date_interval(start, end)
>>> validate_date_interval(end, start)
Traceback (most recent call last):
...
WidgetsError: LaunchpadValidationError: This event can't start
after it ends.
>>> validate_date_interval(end, start, error_msg="A custom error msg")
Traceback (most recent call last):
...
WidgetsError: LaunchpadValidationError: A custom error msg
API Documentation for Launchpad, generated by pydoctor at 2018-10-23 00:00:11.