baldr 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/baldr/validator.rb +4 -0
- data/lib/baldr/version.rb +1 -1
- metadata +1 -1
data/lib/baldr/validator.rb
CHANGED
@@ -38,6 +38,10 @@ module Baldr::Validator
|
|
38
38
|
raise Baldr::Error::ValidationError, "segment #{s[:id]} is required, but nothing was found" if s[:min] > 0
|
39
39
|
end
|
40
40
|
end
|
41
|
+
if l < segment.children.size
|
42
|
+
loop = segment.children[l]
|
43
|
+
raise Baldr::Error::ValidationError, "spare segments #{loop.id}"
|
44
|
+
end
|
41
45
|
|
42
46
|
method = "validate_#{segment.id.downcase}!"
|
43
47
|
if grammar.respond_to?(method)
|
data/lib/baldr/version.rb
CHANGED