Class: XmlFormatValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- XmlFormatValidator
- Defined in:
- lib/validates_xml.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
32 33 34 35 36 |
# File 'lib/validates_xml.rb', line 32 def validate_each(record, attribute, value) err = ValidatesXML::validates_xml(value, ) record.errors[attribute] << err unless err.nil? record.errors[attribute].flatten! end |