Forum Discussion

IgnatiusN's avatar
IgnatiusN
New Contributor II
8 years ago

Data Validator Snap - date - required validation

Hod do you validate if a date field is not null in data validator snap. I have tried setting the field as “Required” and the constraint value to “True” it does not work

3 Replies

  • aleung's avatar
    aleung
    Contributor III

    I also didn’t quite understand the “required” function in the validate snap. You could use $[FIELD] != null in a filter snap instead to get the same effect.

    • IgnatiusN's avatar
      IgnatiusN
      New Contributor II

      Thanks. We wanted to take advantage of the data validator snap’s error output ability. We ended up adding a mapper in front of the data validator snap to convert them to boolean strings (“true”/“false”) and using the pattern matching on data validator.

      It would be good to have some clarity on how “Required” works. According to the documentation “Required” should work for all data types. We also tried to validate the date using “Type” validation for “date”, that didn’t work too.

      The validator appears to be working good only for string types.