How to use script node i am getting errors

I want script for this description.
Date validation should be done using JavaScript.
1)Both dates should be greater than the current date.
2)End date should be greater than or equal to the start date.
I am trying to do it but it’s throwing an error 400 resolve error I tried many things anything didn’t work.

Hello @hmente :smiley:,

Welcome to Kore Community :clap:

Thank you for stopping by!!

Did you look into entity rules?

It should make it easy for you.

hello @swagata.sengupta ,
I looked into Entity Rules for me the entity rules for date period was not working. i have taken the entity as date period it is taking the fromdate and todate perfectly but i want to use the from and to date in script node i can’t use that what should i do.