4.7.6 The CompareValidator tag

Description

The « CompareValidator » validator is used to compare the value entered by the user with another one.

Example

This validation checks that the « Salary » field value is higher than 0.

Rendering

output_html_28c3f4f9.png


XHTML

settings

<bluage:CompareValidator id="salary_value_validation" forid="txt_salary" errormessage="Salary must be greater than 0" comparetovalue="0d" valuetype="double" operator="greaterthan" styleclass="error" />
Screen    activity    diagram

output_html_5ca81b23.png

Entities    Diagram

output_html_m329957d9.png

Service    activity    diagramN/A

Tag attributes: reference

TagCompareValidator
DescriptionCompares a field value entered by the user with another one (another field value or another entered value)
Diagram

output_html_m23740e9c.png

Tag attributes description

AttributeRequiredDescription
IdYUnique tag ID in the page
foridYID of the item to be validated
errormessageNerror message to display in case of validation error
styleclassNError message to display style CSS class
comparetofieldNField ID with which a comparison is made
ComparetovalueNConstant value (it is a comparison with a static value)
valuetypeNComparison type : values to compare are converted into this type before comparison (integer, double, date, string, currency)
operatorYComparison operator (equal, notequal, greaterthan, greaterthanequal, lessthan, lessthanequal )

BLU AGE is a registered trademark of NETFECTIVE TECHNOLOGY S.A. - Trademarks are property of their respective owners
Do not copy or divulge without written permission