Login required
Download

Br Validation

(1)
Author(s) Oscar Konno Sampaio
Current Release 0.1   (2 years ago)
Grails Version 1.1.1 > *
Tags cep  cnpj  cpf 
Dependency
compile ":br-validation:0.1"
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