[bv-dev] BVAL-436 disable executable validation altogether
Hardy Ferentschik
hardy at hibernate.org
Fri Mar 8 05:52:23 EST 2013
Hi all,
While implementing the rules around automatic method validation, I realised that there is no option to
disable automatic method validation altogether via XML.
I thought I could do something like this:
<validated-executables>
<executable-type>NONE</executable-type>
</validated-executables>
However, the xml configuration only acts as a global default for the valuation type and can still
be overridden by explicit @ValidateExecutable annotations. See the algorithm in section 10.1.2 [1].
In fact the xml configuration is consulted last to determine whether validation should occur or not.
As a result we already created BVAL-435 [2] to rename <validated-executables/> to <default-validated-executables/>.
I think that better reflects the intention of this configuration option.
This still does not address the issue of really disabling method validation - BVAL-436 [3]. I see that useful in the case
where you deal with a library where you cannot change the code/annotations and you want to disable validation altogether.
That's currently not possible.
WDYT? Is it too late to add an additional option?
--Hardy
[1] http://beanvalidation.org/1.1/spec/1.1.0.cr1/#integration-general-executable
[2] https://hibernate.onjira.com/browse/BVAL-435
[3] https://hibernate.onjira.com/browse/BVAL-436
More information about the beanvalidation-dev
mailing list