Announcement Announcement Module
Collapse
No announcement yet.
Adding a validator to dijit.form.ValidationTextBox Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding a validator to dijit.form.ValidationTextBox

    I am trying to add a custom validator to a dijit.form.ValidationTextBox decoration.

    The Spring decoration in input.tagx

    Code:
    Spring.addDecoration(new Spring.ElementDecoration({elementId : '_${sec_field}_id', widgetType : 'dijit.form.ValidationTextBox',
    widgetAttrs : { promptMessage : '${sec_field_validation}', invalidMessage : '${sec_field_invalid}', required : ${required}, ${sec_validation_regex} missingMessage : '${field_required}' }}));
    works fine

    However if I add

    Code:
    Spring.addDecoration(new Spring.ElementDecoration({elementId : '_${sec_field}_id', widgetType : 'dijit.form.ValidationTextBox',
    widgetAttrs : { promptMessage : '${sec_field_validation}', invalidMessage : '${sec_field_invalid}', required : ${required}, ${sec_validation_regex} missingMessage : '${field_required}', validator: '${validator}' }}));
    the decoration does not happen.

    the ${validator} is passed in. It is a javascript function loaded in load-scripts.tagx

    Any ideas?

    Thanks,

    fm
Working...
X