Class DateCompareValidatorControl

  • All Implemented Interfaces:
    VariableResolver, IControl, IValidatorControl

    public class DateCompareValidatorControl
    extends ValidatorControl
    A date comparision validator control. This class is designed to compare the date value of two Doui Controls. These controls must register a getValue javascript function (see javascript method lumis/doui/client/script/LumisDoui.js - registerGetValueFunction(formName, controlId, pFunction) for more details) that returns an array of size 2. On the first position (index 0), the date must be returned. On the second position (index 1), the time must be returned. In case the controls being validated only contains date, this array must return on the second position a empty string.

    The XML structure for declaring this control is:

    <control type="lum_dateCompareValidator" controlToValidateId="" compareToControlId="" operator="" dateFormat="" timeFormat="" />

    controlToValidateId: This attribute must contain the Id of the Doui Control that you want to validate. It can be ommited if the validation control is declard within the control you want to validade.

    compareToControlId: This attribute specifies the Id of the Doui Control you want to compare the value of the control being validated.

    operator: equal, lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual.

    dateFormat and timeFormat: specifies the date and time format. If not declared, will use the default date format for the current language locale being used.

    Generates client side and server side validation that compares date values of two controls. The comparison may be either equal, lessThan, lessThanOrEqual, greaterThan or greaterThanOrEqual.

    Example use:
    
     <control:lum_dateCompareValidator controlToValidateId="endDate" compareToControlId="startDate" operator="greaterThanOrEqual" />
     
    xml data available for xsl rendering:
    
     <control id="8A488A03115BCABC01115BD4864700A4" type="lum_dateDataTypeValidator">
     	<script><!-- validation javascript --></script>
     	<data>
     		<clientUniqueId>Form_8A488A031150E33501115107712D01FC8A488A03115BCABC01115BD4864700A4</clientUniqueId>
     	</data>
     </control>
     
    Since:
    4.0.9
    Version:
    $Revision: 22315 $ $Date: 2019-01-25 18:30:16 -0200 (Fri, 25 Jan 2019) $