Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to do date validation #278

za77 started this conversation in General
Discussion options

Hi,
How to implement the date Validation ?
How can we make the value attribute dynamic?

You must be logged in to vote

Replies: 2 comments

Comment options

Hi,

I was trying to implement the same thing, and I used new Date("<dateString>").valueOf() and used it with the existing operators.

You must be logged in to vote
0 replies
Comment options

In order to make the value attribute inside your conditions dynamic use the Fact() with asynchronous call to load you fact and inside the condition you can spcify it as follows:

let rule = new Rule({
 conditions: {
 all: [{
 fact: "TEST_FACT_01",
 operator: "equal",
 value: {
 fact: "TEST_FACT_02",
 }
 }]
 }
}

path and param helpers are availble inside the rule for both fact and value.

Reference: #274 (comment)

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /