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