Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Validation

Options
priyagautam
priyagautam Posts: 10

I have one field in my json as
Price : “40.0” ( in string)

In json assertor , i am using numaric assertion to validate but its passing where expectation is it should fail as its not integer.
How to validate that?

Tagged:

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,244 ✭✭✭
    edited November 2023
    Options

    A "Numeric Assertion" checks the numeric value of a node, regardless of its type. To check the type of a node, please create a "Type Assertion". Look under "Structure Assertions". There is a combo box to select the expected JSON type.

Tagged