A simple regex based exhaustive validator for PIN codes in India
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
india-pincode-regex/tests/validate_spec.rb

9 lines
226 B

require 'pincode_validator'
describe PincodeValidator do
it 'should validate pincodes' do
['244713', '560029', '560030', '110011'].each do |pin|
expect(described_class::valid? pin).to eq(true)
end
end
end