Class: GeojsonValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- GeojsonValidator
- Defined in:
- lib/geojsonlint/geojson_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/geojsonlint/geojson_validator.rb', line 7 def validate_each(record, attribute, value) unless valid_geojson?(value) = [:message] || "is invalid" record.errors.add(attribute, ) end end |