Merge pull request #35 from dougneal/error_reporting
Improve error reporting
This commit is contained in:
commit
5ca584ff13
@ -24,7 +24,7 @@ Puppet::Type.newtype(:resource_record) do
|
|||||||
isrequired
|
isrequired
|
||||||
|
|
||||||
validate do |value|
|
validate do |value|
|
||||||
Util::Errors.fail "Invalid value for record: #{value}" unless value =~ /^(\*\.)?([a-zA-Z0-9_-]+\.)*[a-zA-Z0-9_-]+$/
|
raise ArgumentError, "Invalid value for record: #{value}" unless value =~ /^(\*\.)?([a-zA-Z0-9_-]+\.)*[a-zA-Z0-9_-]+$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user