Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 441 Bytes

iso_validator.md

File metadata and controls

16 lines (11 loc) · 441 Bytes

ISO 8859-1 Whitelist Validator

Whitelist all ISO-8859-1 chars. Removes all chars that are not in ISO-8859-1 range. Unicode UTF8 Table

Installation

  • copy iso_validator.rb to app/validators/iso_validator.rb
  • copy iso_validator_spec.rb to spec/validators/iso_validator_spec.rb

Usage

validates :name, presence: true, iso: true
validates :street, iso: true