in reply to Custom error messages and moose
Type constraints allow custom error messages. So you could create an "IPAddress" type constraint as a subtype of "Str", and provide an error message for that.
See Moose::Util::TypeConstraints.