About hibernate validator error codes

Hi all.

Can I implement error handling based on HV00x error codes of Hibernate Validator? I expected to get specific exceptions for each error case, but since the difference is only represented by error codes in the message of single ValidationException, I’m not sure it is “safe” to rely on them.

Although javadoc of org.hibernate.validator.internal.util.logging.Log says that error codes should not be reused (changed) but they may be deleted and I will not get any compilation error in my code. Also this all is inside org.hibernate.validator.internal.* package and I feel I shouldn’t use anything from there.

Is this API subject to change, and if so, may it be that one day the error codes could be completely removed from messages? Or even if changed the changes would be painless, for example by using sub-types of ValidationException.

Thank you.