Ariod
Ariod

Reputation: 5851

Setting XML attribute regular expression pattern in JAXB?

Is there a way to specify a regular expression pattern on an @XmlAttribute somehow through annotations? Is there a way of doing this besides validation through an external schema?

Upvotes: 1

Views: 1213

Answers (1)

bdoughan
bdoughan

Reputation: 149047

You could use an implementation of JSR-303 which provides both annotations and an XML config file for specifying rules for bean validation:

Upvotes: 2

Related Questions