runtimerevolution / citizenship

Citizenship provides easy validations on personal documents, addresses, bank account numbers and other personal information, in Portugal.
MIT License
22 stars 6 forks source link

How does this actually work #1

Closed i-arindam closed 11 years ago

i-arindam commented 11 years ago

Seems promising, but I would like some more information along the lines of:

1) What does it do? 2) How to use it? 3) What can be the use-cases?

caapal commented 11 years ago

Hi i-arindam,

This is something that we extract from a project but we hadn't had enough time yet to add some docs.

We intent this gem to be a repository for common validation functions performed on form fields. Currently is focused on the ones used in Portugal. We cover CRC checks for some IDs, and format check for other fields (like zip code and phone).

There are some rails validators implemented (check lib/citizenship/rails/validators.rb) but you can always call the methods directly: Citizenship.valid_identification_card?(value).

Cheers