I am looking for a way to validate IP addresses in Grails via constraints.
Is something like this possible?
package example
class Ip {
String ip
static constraints = {
ip(unique: true, inetAddress: true)
}
}
I have found this link: http://grails.org/doc/2.2.x/api/org/codehaus/groovy/grails/validation/routines/InetAddressValidator.html, but I don't know how to implement this.