DateValidator
is a caplin.trading.validation.Validator that provides functions to ensure supplied data contains valid dates.DateValidator
uses the Moment.js JavaScript library (http://momentjs.com) for date parsing.
Refer to the Moment.js JS API documentation for further details of the pattern characters.
Attributes | Name and Description |
---|---|
|
caplin.trading.validation.DateValidator(Array l_pMandatoryFields, String sDatePattern, boolean l_pMustBeFuture)
The constructor for the |
Attributes | Name and Description |
---|---|
|
String
validateField(String sFieldValue)
Performs a validation on the specified field value to determine if it is a valid date. |
►
caplin.trading.validation.DateValidator(Array l_pMandatoryFields, String sDatePattern, boolean l_pMustBeFuture)
The constructor for the DateValidator
.
Array | l_pMandatoryFields | An array of string field names that must be present in the data to validate. Must not be null. |
String | sDatePattern | An optional string representing the pattern of the date format to recognise. |
boolean | l_pMustBeFuture | Optional. True indicates that the validator should only allow dates that are in the future. Defaults to false. |
►
String
validateField(String sFieldValue)
Performs a validation on the specified field value to determine if it is a valid date.
String | sFieldValue | The field value to validate. |