Integer

Check if the value is an integer or a floating-point

Integer

Checks if the given number is an integer

import Schema from "@rapidom/schema";

const Validator = Schema.number().integer();
const Validator = Schema.number().integer(true); // same result

Floating Point

Checks if the given number is a floating-point

import Schema from "@rapidom/schema";

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

Last updated