Cleanup validation regex's
Update the validation regexes to remove any unnecessary capture groups Change-Id: I326fa7f5f860fd5a1a19c67339e0cfede19afce7
This commit is contained in:
parent
22ca619900
commit
07e04ded21
|
@ -25,14 +25,14 @@ from designate.openstack.common import log as logging
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
RE_DOMAINNAME = r'^(?!.{255,})(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)\.)+$'
|
||||
RE_HOSTNAME = r'^(?!.{255,})(?:(^\*|(?!\-)[A-Za-z0-9_\-]{1,63})(?<!\-)\.)+$'
|
||||
RE_HOSTNAME = r'^(?!.{255,})(?:(?:^\*|(?!\-)[A-Za-z0-9_\-]{1,63})(?<!\-)\.)+$'
|
||||
|
||||
# The TLD name will not end in a period.
|
||||
RE_TLDNAME = r'^(?!.{255,})(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-))' \
|
||||
r'(\.(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)))*$'
|
||||
r'(?:\.(?:(?!\-)[A-Za-z0-9_\-]{1,63}(?<!\-)))*$'
|
||||
|
||||
RE_UUID = r'^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-' \
|
||||
r'([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$'
|
||||
RE_UUID = r'^(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-' \
|
||||
r'(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}$'
|
||||
|
||||
draft3_format_checker = jsonschema.draft3_format_checker
|
||||
draft4_format_checker = jsonschema.draft4_format_checker
|
||||
|
|
Loading…
Reference in New Issue