Positive
Check if the value is positive or negative
Positive
Checks if the given number is a valid port number
import Schema from "@rapidom/schema";
const Validator = Schema.number().positive();
const Validator = Schema.number().positive(true); // same resultNegative
Checks if the given number is a valid port number
import Schema from "@rapidom/schema";
const Validator = Schema.number().positive(false);Last updated
Was this helpful?