Commit 438dff86 authored by Nigel Kukard's avatar Nigel Kukard

Validate regex validation property

parent 79182935
......@@ -1265,6 +1265,15 @@ sub _init
# Set params
} elsif ($validateOption eq "params") {
$property->{'validate'}->{'params'} = [ @{$validateValue} ];
# Set regex
} elsif ($validateOption eq "regex") {
$property->{'validate'}->{'regex'} = $validateValue;
# Check that the regex type has a regex argument
if (ref($property->{'validate'}->{'regex'}) ne "Regexp") {
$self->_log(DATAOBJ_LOG_ERROR,"Property '%s' has a regex match but not a type consistent with qr( /.../ )",
$propertyName);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment