Redwood validation on ActionDate on Change assignment page - not working
Summary:
Im trying to add validation on actiondate if its not equal to 1 then expected inline text error. Please find below code for reference. Let me know if im missing anything.
Content (please ensure you mask any confidential information):
Version (include the version you are using, if applicable):
24C
Code Snippet (add any code snippets that support your topic, if applicable):
/* eslint-disable dot-notation */define([], () => { 'use strict';
/** * * @param {object} context * @return {boolean} */
function runCondition(context) { const { $componentContext, $fields, $modules, $user } = context;
const d = new Date($fields.employmentWhenAndWhy.ActionDate.$value());
let day = d.getDate();
if (day !== 1)
{ return true; }
}
return { runCondition };
});
Thanks in advance if you have any inputs on this issue.