Validator for all specified properties written, not yet tested.

This commit is contained in:
Simon Brooke 2023-01-08 13:05:23 +00:00
parent 6093a775f1
commit 34847058fc
3 changed files with 233 additions and 61 deletions

View file

@ -40,6 +40,12 @@
[x]
(if x true false))
(defn xsd-non-negative-integer?
"Return `true` if `value` matches the pattern for an
[xsd:nonNegativeInteger](https://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger), else `false`"
[x]
(and (integer? x)(>= x 0)))
(defn has-type?
"Return `true` if object `x` has a type in `acceptable`, else `false`.