Showing results for 
Search instead for 
Did you mean: 

Data Validator Snap - multiple validations

New Contributor II

I have two fields I wish to validate. These fields simply just need to be present. I attempted to use the Data Validator snap. Its configuration is similar to the screen shot below. This snap routes documents to the error view where $field1 is null with a message “Missing property value of $.field1”. Similarly for field2. I wish to notify users of the issue with their input data. If a document is missing both fields, only the first message appears in the error output. Which means the user will correct the input data for the first problem but have to wait and be notified about the second missing value after a subsequent run.
Is this the expected behaviour.
I know that I could use a copy snap and two data validators but that introduces additional steps to bring valid records back into the pipeline flow.
Is there a way to get the Data Validator snap to behave as I would like?



Contributor III

Hi @Thom ,
Good day, here's another option use a "router snap" . hope it fits to your requirement 
Make sure that "First match" is checked