Supplemental Questions - Validate Date Format

alisonwan
alisonwan Member
edited June 10 in CCCApply

Hi.

From the Working with Supplemental Questions User Guide, it says that Date element is not recommended. Could anyone share how to implement/validate a date value using Text element please? Thank you in advance.

User guide reference: https://cccnext.jira.com/wiki/spaces/PD/pages/2612068356/Working+with+Supplemental+Questions+User+Guide

Best Answer

  • alisonwan
    alisonwan Member
    Answer ✓

    Hi Jason,

    Thank you for the quick reply and the confirmation. And I appreciate the link to the newest data dictionary document at the same time.

    And just to clarify my intent. The new date field in question is for a supplemental question. The validation is not related to High School Completion Date. But since I had seen the way High School Completion Date is designed and implemented using 3 separate attributes, I figured that is how it can be done in Supplemental Questions. And as far as validation of the new date goes, it is only to confirm that it is outside the scope of the Supplemental Questions page, which you have.

    Thank you Jason.

    Alison

Answers

  • Jason Smith
    Jason Smith Member, Moderator

    Hello,

    From the user guide...

    The <Date> Element

    This element creates a text input field that allows for a date in MM/DD/YYYY format. We recommend that you do not use this element; it does not properly validate user input, and can result in invalid values being stored in the database.

    The TechCenter is not aware of any workarounds on this. This would be a use at your own risk.

    Thank You,

    Jason Smith

    Support Engineer CCCTC

  • alisonwan
    alisonwan Member
    edited June 3

    Hi Jason,

    Thank you for taking my question. I see in CCCApply application that the High School completion date is captured in 3 separate attributes : Month, Day, Year, which then checks for a valid date.

    In Supplemental Questions, I suppose that requires a combination of three SUPP_* attributes to be used. Does it also mean that we do the date formatting and validation after receiving the values from the staging table, as it does not look like we can validate it online?

    Appreciate your feedback.

    Alison

  • Jason Smith
    Jason Smith Member, Moderator

    Hello Alison ,

    On about page 95 of the data dictionary you can see the details behind the High School Completion Date .

    I am not sure at what layer the business logic for the validation occurs.

    I do not think that it is possible to inject your own programmatic logic into any part of the supplemental application for validation that is custom or which goes beyond what is stated in the documentation.

    Thank You,

This discussion has been closed.