blob: 095526c8f6e487590675d313f93746a9f196d4cb [file] [log] [blame]
<md-content layout="column" layout-align="center stretch" class="content">
<ul class="breadcrumb">
<li><a href="#/documentation/2.0.2">2.0.2</a> <span class="divider">/</span></li>
<li><a href="#/documentation/2.0.2/language/overview">Language</a></li>
<h2 id="Validation">Validation</h2>
<h3 id="description">Description</h3>
<p>EEF provides three different mechanisms in order to add validation in the user interface. Those three mechanisms can be divided in two categories, the semantic validation rules and the property validation rules.</p>
<p class="image">
<img class="validation1-6-0" border="0" src="sections/documentation/2.0.2/language/validation.png"/>
<p>The semantic validation rules will run an expression in the context of a
<a href="#/documentation/2.0.2/language/page">page</a> or a
<a href="#/documentation/2.0.2/language/group">group</a>. The result of those validation rules will be visible directly on their containing page or group. The property validation rules are only available on a group and they allow the specifier to link validation rules to a specific set of widgets.
<p>Both kinds of validation rules can have various audits to determine potential issues thanks to an audit expression. This expression must return a boolean indicating if the validation of the rule is a success. All of those expressions have access to the variables
<code>self</code>, the result of the semantic candidate expression of the page or group and
<code>input</code> the input of the view.
<p>Both kinds of validation rules can also have various validation fixes used to correct the issue. Those validation fixes have a name and a fix expression which will be executed once the end user select a quick fix. The fix expression does not have to return anything.</p>