boxModelValidator

See source code

Validator for BoxModel objects that ensures they have numeric x, y coordinates for position and w, h values for width and height. Used throughout the schema to validate bounding box and rectangular area data structures.

boxModelValidator: T.ObjectValidator<BoxModel>

Example

const box = { x: 10, y: 20, w: 100, h: 50 }
const isValid = boxModelValidator.check(box) // true

const invalidBox = { x: 10, y: 20, w: -5, h: 50 }
const isValidNegative = boxModelValidator.check(invalidBox) // true (validator allows negative values)
Prev
bookmarkShapeProps
Next
CameraRecordType