Platinum Partner

iScreen 2.0.0: Reporting Validation Failures

iScreen is a Java object validation framework, which means it is designed to validate full object-graphs. Based upon a powerful and flexible XML configuration, developers concentrate on configuring their validations, rather than coding them.

This new release adds several new features related to reporting validation failures. Failures can now have arbitrary severity levels, multiple failure messages, and a better tracing capability. A new conditional was added to individual validator use, which means that you can use logic to determine whether to execute a validator or not. Both OGNL and MVEL are supported expressions languages.

Here's an example of using the new 'if' attribute on the 'use-validator' element, and multiple messages associated with a failure (as well as defining a severity level on a failure).

<validation-set id="validateMyObject">

...

<use-validator ref="MyStringValidator" if="bean. someProp != null" />

</validation-set>



<validator id="MyStringValidator" ref="org.iscreen.StringValidator">

...

<failure property="minLengthFailure" key="minLengthMessage" severity="warning">

<msg name="action" key="minLengthActionMessage" />

<msg name="log_message" key="minLengthLogMessage" />

</failure>

</validator>
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}