Grails provides support for validating fields. Here is a typical User class with field validation. It ensure that email address & url is of proper format, login is unique and password is not openly displayed.
package com.taragana class User { String login String password String email String url static constraints = { login unique: true password password: true email email: true url url: true } }