Plugins You can find out about all the publicly available Grails plugins.

Grails Extra Validators

  • Authors: Antony Jones
1 vote
compile ":extra-validators:0.2"



Provides a bundle of extra validators for grails


grails install-plugin extra-validators


Provides validators in addition to the grails default validators, currently:
  • Postcodes
    • United Kingdom
    • United States
    • Canada
  • Password confirmation
Postcode Validation

Use the postcode validator in your domain/command/@Validatable classes as follows:

static constraints = {
    postcode postalCode: PostalCountry.UK

To determine which country your postcode validates as, set it's parameter to the PostalCountry value of your choice (currently one of UK, US, CA).

Password confirmation validation

static constraints = {
    password confirmedPassword: 'passwordConfirmation'

In the example above, the validator validates that the value of the field 'password' is equal (confirmed by) the value of the field 'passwordConfirmation'.