[hibernate-issues] [Hibernate-JIRA] Commented: (HV-491) Add support for MOD11 Algorithm

Hardy Ferentschik (JIRA) noreply at atlassian.com
Tue Jan 31 04:49:13 EST 2012


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45316#comment-45316 ] 

Hardy Ferentschik commented on HV-491:
--------------------------------------

{quote}
There is another rule on the CPF constraint: "00000000000" and "99999999999" returns true on the current algorithm, however, they should not be used when thinking about business requirements.
{quote}
If these values are excluded by the ruls of a CPF the constraint should handle them.

{quote}
Is there a @InvalidValues constraint or something like it ?
{quote}

There is no _ at InvalidValue_. I guess you would use a regular expression. Something like
{noformat}
^(?:(?!000\.000\.000-00).)*$
^(?:(?!999\.999\.999-99).)*$
{noformat}
should work in conjunction with _ at Pattern.List_



> Add support for MOD11 Algorithm
> -------------------------------
>
>                 Key: HV-491
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-491
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: validators
>            Reporter: George Gastaldi
>            Assignee: Hardy Ferentschik
>             Fix For: 4.3.0.Alpha1
>
>
> It would be nice to add support for the MOD11 algorithm. It is described on http://joselop.es/mod-11 or http://en.wikipedia.org/wiki/MSI_Barcode#Mod_11_Check_Digit and it is  widely used on Brazil, such as CPF (Cadastro de Pessoa Física - http://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F%C3%ADsicas), CNPJ (Cadastro de Pessoa Jurídica - National Registry of Corporations) and Título de Eleitor (Voter ID card)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list