[bv-dev] BVAL-436 disable executable validation altogether

Gunnar Morling gunnar at hibernate.org
Wed Mar 13 09:35:09 EDT 2013


> I'd like BootstrapConfiguration to mimic the name we use in the XSD.
Does that change your proposal?

Maybe isExecutableValidationEnabled() then? I guess this would match
<executable-validation
enabled="true|false"> quite closely.

> How would that be designed in BootstrapConfiguration?

Two methods, isExecutableValidationEnabled() and
getDefaultValidatedExecutableTypes()? It would be in the responsibility of
the caller to make use of the latter only if the former returned true.




2013/3/13 Emmanuel Bernard <emmanuel at hibernate.org>

> I'd like BootstrapConfiguration to mimic the name we use in the XSD.
> Does that change your proposal?
>
> I thought about using choice but it forces people to comment out their
> default validated executable section.
>
> That being said, I like your proposal for
> <executable-validation enabled="false"/> with a default to true.
>
> How would that be designed in BootstrapConfiguration?
>
> Emmanuel
>
> On Wed 2013-03-13 11:54, Gunnar Morling wrote:
> > What I like about approach #2 is that it bundles the configuration
> related
> > to executable validation in one element.
> >
> > Maybe an attribute could be used for the flag:
> >
> >     <executable-validation enabled="true|false">
> >         <default-validated-executables>
> >             <executable-type>NONE</executable-type>
> >         </default-validated-executables>
> >     </executable-validation>
> >
> > Generally I like "positive" flag names better than negated ones (i.e.
> > "enabled" instead of "disabled").
> >
> > If you want to stick to two elements instead of an attribute, a xs:choice
> > could be used to express that only one of the elements may be present in
> a
> > given instance document.
> >
> > > Would isValidationExecutionDisabled() not a better name?
> >
> > Or isValidationOnExecutionEnabled()?
> >
> > --Gunnar
> >
> >
> >
> > 2013/3/13 Hardy Ferentschik <hardy at hibernate.org>
> >
> > >
> > > On 13 Jan 2013, at 8:37 AM, Emmanuel Bernard <emmanuel at hibernate.org>
> > > wrote:
> > >
> > > > https://gist.github.com/emmanuelbernard/2191bad0c7d8742a8eea
> > > >
> > > > Approach #1 has my preference I believe.
> > >
> > > +1 A single flag works.
> > >
> > > > Likewise BootstrapConfiguration would get a Boolean
> > > > getDisableValidationExecution() method that is ignored by Bean
> > > > Validation engines proper.
> > >
> > > Would isValidationExecutionDisabled() not a better name?
> > >
> > > --Hardy
> > >
> > > _______________________________________________
> > > beanvalidation-dev mailing list
> > > beanvalidation-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> > >
>
> > _______________________________________________
> > beanvalidation-dev mailing list
> > beanvalidation-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20130313/800d7aa2/attachment-0001.html 


More information about the beanvalidation-dev mailing list