Control type payment-date-expiry

default.control

Using this format denotes a property as an expiry date and causes its control to allow the input of a month and year

Ensures expiry date is in the future

Output a expiry date control with the name "foo"

{{control "foo" control-type="payment-date-expiry"}}

or just

{{control "foo"}}

if the controltype property for the "foo" property in the model schema has been set to "payment-date-expiry"

Error codes

  • provided by default.control~monthYearValidate
Source:
See:

Methods

(static) display()

Source:

(static) normalize()

Source:

(static) prepare()

Source:

(static) validate()

Source:

(inner) monthYearNormalize(value) → {string}

Parameters
Name Type Description
value string
Source:
Returns

Normalised date

Type
string

(inner) monthYearPrepare(control, options) → {control}

Parameters
Name Type Description
control control
options object
Source:
Returns

Updated control

Type
control

(inner) monthYearValidate(value, optionsopt) → {boolean}

Error codes

  • month-year.invalid-{{exclude}}
Parameters
Name Type Attributes Description
value string
options object <optional>
Source:
Returns

Validation status

Type
boolean

(inner) monthYearValue(value, phrasekeyopt) → {string}

Parameters
Name Type Attributes Description
value string

Value to be formatted

phrasekey string <optional>

Key to use for phrase lookup

Source:
To Do:
  • phrasekey param looks wrong and pointless

Returns

Formatted month/year

Type
string