Module: ZaIdValidator
- Defined in:
- lib/za-id-validator.rb
Instance Method Summary collapse
Instance Method Details
#valid_za_identity_number?(id) ⇒ Boolean
3 4 5 6 7 |
# File 'lib/za-id-validator.rb', line 3 def valid_za_identity_number?(id) id = id.to_s # force to a string return false unless length_is_valid?(id) id.chars.to_a.last.to_i == z(id) end |