Custom Table Field Validation Based on another field.

VASANTH K asked on January 19, 2017 11:59

Kentico Version: 9.0.42

I have the following fields,


Status -> {1,2,3}

Note -> {text}

Date -> {DateTime}

Here note and Date is required only when user select value as 2/3 in Status field, is this possible with built in validation feature itself, I know we can control the visibility but my requirement is other to field are optional when Status is set to 1, If we its not possible with built in feature, Which is correct method to implement this kind of validation in custom table.

Recent Answers

Dawid Jachnik answered on January 19, 2017 13:08

Hi, yes you can do it by validation rules with compare to another field Image Text

1 votesVote for this answer Mark as a Correct answer

VASANTH K answered on January 20, 2017 13:05 (last edited on January 20, 2017 13:08)

@Dawid Jachnik, I know we can compare with another field using validation but how come this will help for my Question, The thing is I am not comparing two field value, please read my question once again.

But some how I managed to add General Validate and Marco its works greate but the problem is when specific field has no value, validation not working, e.g When notes is empty, the validation I added to this field is not triggered and it allow blank value without consider the validation, So In order overcome this I added validation to required field so it always has value then validate other field using that Validation works but error message show to user all under the same field and only one validation message error shows other supressed.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.