The zoom level.
Range plus ValidatorOptions; min defaults to 0, max to 20.
{ valid, error }; error is null when valid.
GeoLeaf.Validators.validateZoom(12);
// Returns: { valid: true, error: null }
GeoLeaf.Validators.validateZoom(25);
// Returns: { valid: false, error: 'Zoom must be between 0 and 20' }
// Plage personnalisée
GeoLeaf.Validators.validateZoom(15, { min: 5, max: 18 });
// Returns: { valid: true, error: null }
Validates a zoom level against a range.
Defaults to
[0, 20], both inclusive.NaNand the infinities are rejected explicitly, so a value that arithmetic produced rather than a user is caught here rather than downstream.