franckverrot / activevalidators

Collection of ActiveModel/ActiveRecord validators
https://rubygems.org/gems/activevalidators
MIT License
306 stars 49 forks source link

Fix NINO array literal syntax #99

Closed alyssais closed 7 years ago

alyssais commented 7 years ago

The commas were included in the generated array elements, so NINOs were never rejected for having unallocated or administrative prefixes. An example number that should have been rejected but wasn't is GB123456C.

Unfortunately, the tests didn't catch this mistake because they used the same incorrect syntax as the implementation. This commit fixes both the implementation and the tests.

franckverrot commented 7 years ago

Oh damn, thanks for catching this 😓

I'll cut a release today!

franckverrot commented 7 years ago

Released! thanks for your contributions!