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 result

Negative

Checks if the given number is a valid port number

import Schema from "@rapidom/schema";

const Validator = Schema.number().positive(false);

Last updated