Skip to content
Peter Svetlichny edited this page Aug 3, 2015 · 3 revisions

Validation for numeric types


multipleOf


multipleOf number validation

Schema

"schema": {"multipleOf": 1.5}

API

var schema = json.multipleOf(1.5);

maximum and exclusiveMaximum


maximum with exclusiveMaximum validation

Schema

"schema": {
	"maximum": 3.0,
	"exclusiveMaximum": true
}

API

var schema = json
              .maximum(3.0)
              .exclusiveMaximum(true);

minimum and exclusiveMinimum


minimum with exclusiveMinimum

Schema

"schema": {
	"minimum": 1.1,
	"exclusiveMinimum": true
}

API

var schema = json
              .minimum(1.1)
              .exclusiveMinimum(true);