Optimize some regexps
This commit is contained in:
parent
f0193ef167
commit
b8181f2ecf
|
@ -68,7 +68,9 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
|
|||
'keyText' => {
|
||||
'keyTest' => qr/^[a-zA-Z0-9_]+$/,
|
||||
'msgFail' => '__badValue__',
|
||||
'test' => qr/^.*$/
|
||||
'test' => sub {
|
||||
1;
|
||||
}
|
||||
},
|
||||
'keyTextContainer' => {
|
||||
'keyMsgFail' => '__badKeyName__',
|
||||
|
@ -778,7 +780,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
|
|||
'default' => 'example.com',
|
||||
'msgFail' => '__badDomainName__',
|
||||
'test' =>
|
||||
qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?))?/,
|
||||
qr/^(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-9]*[a-zA-Z0-9]|[a-zA-Z])[.]?))?$/,
|
||||
'type' => 'text'
|
||||
},
|
||||
'exportedAttr' => {
|
||||
|
|
|
@ -169,7 +169,7 @@ sub types {
|
|||
},
|
||||
keyText => {
|
||||
keyTest => qr/^[a-zA-Z0-9_]+$/,
|
||||
test => qr/^.*$/,
|
||||
test => sub { 1 },
|
||||
msgFail => '__badValue__',
|
||||
},
|
||||
menuApp => {
|
||||
|
@ -572,7 +572,7 @@ sub attributes {
|
|||
},
|
||||
domain => {
|
||||
type => 'text',
|
||||
test => qr/^(?:$Regexp::Common::URI::RFC2396::hostname)?/,
|
||||
test => qr/^(?:$Regexp::Common::URI::RFC2396::hostname)?$/,
|
||||
msgFail => '__badDomainName__',
|
||||
default => 'example.com',
|
||||
documentation => 'DNS domain',
|
||||
|
|
Loading…
Reference in New Issue
Block a user