Br Validation
Dependency :
compile ":br-validation:0.1"
Summary
Installation
grails install-plugin br-validation
Description
Description
This plugin implements constraints, to be used in domain classes, that make validation of brazilians documents and units.Validations
Version 0.1
- CPF - validate the format ###.###.###-## and the verifier digit
- CNPJ - format (##.###.###/####-##) and digit
- CEP - format (#####-###)
Usage
class Person {
String name
String cpf
String address
String postalCode static constraints = {
cpf(cpf:true)
postalCode(cep:true)
}
}class Organization {
String name
String cnpf static constraints = {
cnpj(cnpj:true)
}
}