Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OVal (http://http://oval.sourceforge.net/) may fully satisfy your needs.</p> <p>Let's imagine you have a placeholder for all values coming from your form. It can be constructed and populated with the actual data when user submits the form. OVal allows you to define constraints for class fields:</p> <pre><code>public class BusinessObject { @NotNull @NotEmpty @Length(max=32) private String name; ... } </code></pre> <p>Having that defined you can easily trigger validation procedure. OVal will supply you with a list of violations, so you can easily construct your summary dialogue.</p> <pre><code>Validator validator = new Validator(); BusinessObject bo = new BusinessObject(); // collect the constraint violations List&lt;ConstraintViolation&gt; violations = validator.validate(bo); </code></pre> <p>You can get rid of intermediate placeholders by using getters constraints. </p> <pre><code>public class BusinessObject { @IsInvariant @NotNull @Length(max = 4) public String getName() { ... } } </code></pre> <p>Please note, OVal follows clean design principle and can be easily extended. Anyway, it provides quite a lot of power out of the box:</p> <ul> <li>conditional constraints using expression languages</li> <li>constraints for nested properties</li> <li>recursive validation</li> <li>constraints for method parameters</li> <li>scripted expressions for preconditions</li> <li>method return value constraints</li> <li>probe mode to simplify UI user input validation</li> <li>and much more</li> </ul> <p>Please see <a href="http://oval.sourceforge.net/userguide.html" rel="nofollow">http://oval.sourceforge.net/userguide.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload