Last updated by admin 2 years ago
grails install-plugin br-validation
Last updated by oscarks 2 years ago
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)
}
}
Last updated by admin 2 years ago
Last updated by admin 2 years ago