Liking cljdoc? Tell your friends :D
All platforms.

malli.core


-->-schemaclj/s

(-->-schema _)

Experimental simple schema for :=> schema. AST and explain results subject to change.

Experimental simple schema for :=> schema. AST and explain results subject to change.
sourceraw docstring

-=>-schemaclj/s

(-=>-schema)
source

-and-schemaclj/s

(-and-schema)
source

-any-schemaclj/s

(-any-schema)
source

-astclj/s

(-ast acc properties options)
source

-ast?clj/s

(-ast? x)
source

-boolean-fnclj/s

(-boolean-fn x)
source

-boolean-schemaclj/s

(-boolean-schema)
source

-cachedclj/s

(-cached s k f)
source

-cached?clj/s

(-cached? x)
source

-check-children!clj/s

(-check-children! type properties children props)
(-check-children! type properties children min max)
source

-collection-schemaclj/s

(-collection-schema props)
source

-collection-transformerclj/s

(-collection-transformer t empty)
source

-compclj/s≠

clj
(-comp)
(-comp f)
(-comp f g)
(-comp f g h)
(-comp f1 f2 f3 f4)
(-comp f1 f2 f3 f4 f5)
(-comp f1 f2 f3 f4 f5 f6)
(-comp f1 f2 f3 f4 f5 f6 f7)
(-comp f1 f2 f3 f4 f5 f6 f7 f8)
(-comp f1 f2 f3 f4 f5 f6 f7 f8 & fs)
cljs
(-comp)
(-comp f)
(-comp f g)
(-comp f g h)
(-comp f1 f2 f3 & fs)
source

-create-cacheclj/s

(-create-cache _options)
source

-create-entry-formclj/s

(-create-entry-form parent properties entry-parser options)
source

-create-entry-parserclj/s

(-create-entry-parser ?children props options)
source

-create-formclj/s

(-create-form type properties children options)
source

-default-entryclj/s

(-default-entry e)
source

-default-entry-schemaclj/s

(-default-entry-schema children)
source

-default-sci-optionsclj/s

(-default-sci-options)
source

-delayed-registryclj/s

(-delayed-registry m f)
source

-deprecated!clj/s

(-deprecated! x)
source

-deregister-function-schemas!clj/s

(-deregister-function-schemas! key)
source

-deregister-metadata-function-schemas!clj/s

(-deregister-metadata-function-schemas! key)
source

-double-schemaclj/s

(-double-schema)
source

-eager-entry-parserclj/s

(-eager-entry-parser children props options)
source

-entry-astclj/s

(-entry-ast schema keyset)
source

-entry-parser?clj/s

(-entry-parser? x)
source

-entry-schema?clj/s

(-entry-schema? x)
source

-enum-schemaclj/s

(-enum-schema)
source

-equalsclj/s

(-equals x y)
source

-exceptionclj/s

(-exception type data)
source

-fail!clj/s

(-fail! type)
(-fail! type data)
source

-float-schemaclj/s

(-float-schema)
source

-fn-schemaclj/s

(-fn-schema)
source

-from-child-astclj/s

(-from-child-ast parent ast options)
source

-from-entry-astclj/s

(-from-entry-ast parent ast options)
source

-from-type-astclj/s

(-from-type-ast parent ast options)
source

-from-value-astclj/s

(-from-value-ast parent ast options)
source

-function-schemaclj/s

(-function-schema _)
source

-get-entriesclj/s

(-get-entries schema key default)
source

-group-by-arity!clj/s

(-group-by-arity! infos)
source

-guardclj/s

(-guard pred tf)
source

-inferclj/s

(-infer children)
source

-inner-entriesclj/s

(-inner-entries walker path entries options)
source

-inner-indexedclj/s

(-inner-indexed walker path children options)
source

-instrumentclj/s

(-instrument props)
(-instrument props f)
(-instrument props f options)

Takes an instrumentation properties map and a function and returns a wrapped function, which will validate function arguments and return values based on the function schema definition. The following properties are used:

keydescription
:schemafunction schema
:scopeoptional set of scope definitions, defaults to #{:input :output :guard}
:reportoptional side-effecting function of key data -> any to report problems, defaults to m/-fail!
:genoptional function of schema -> schema -> value to be invoked on the args to get the return value
Takes an instrumentation properties map and a function and returns a wrapped function,
which will validate function arguments and return values based on the function schema
definition. The following properties are used:

| key       | description |
| ----------|-------------|
| `:schema` | function schema
| `:scope`  | optional set of scope definitions, defaults to `#{:input :output :guard}`
| `:report` | optional side-effecting function of `key data -> any` to report problems, defaults to `m/-fail!`
| `:gen`    | optional function of `schema -> schema -> value` to be invoked on the args to get the return value
sourceraw docstring

-int-schemaclj/s

(-int-schema)
source

-interceptingclj/s

(-intercepting interceptor)
(-intercepting {:keys [enter leave]} f)
source

-into-transformerclj/s

(-into-transformer x)
source

-keyword->stringclj/s

(-keyword->string x)
source

-keyword-schemaclj/s

(-keyword-schema)
source

-lazyclj/s

(-lazy ref options)
source

-lazy-entry-parserclj/s

(-lazy-entry-parser ?children props options)
source

-map-of-schemaclj/s

(-map-of-schema)
(-map-of-schema opts)
source

-map-schemaclj/s

(-map-schema)
(-map-schema opts)
source

-map-transformerclj/s

(-map-transformer ts)
source

-maybe-schemaclj/s

(-maybe-schema)
source

-memoizeclj/s

(-memoize f)
source

-min-max-predclj/s

(-min-max-pred f)
source

-multi-schemaclj/s

(-multi-schema)
(-multi-schema opts)
source

-needed-bounded-checksclj/s

(-needed-bounded-checks min max options)
source

-nil-schemaclj/s

(-nil-schema)
source

-no-op-transformerclj/s

(-no-op-transformer)
source

-not-schemaclj/s

(-not-schema)
source

-or-schemaclj/s

(-or-schema)
source

-or-transformerclj/s

(-or-transformer this transformer child-schemas method options)
source

-orn-schemaclj/s

(-orn-schema)
source

-parent-children-transformerclj/s

(-parent-children-transformer parent children transformer method options)
source

-parse-entry-astclj/s

(-parse-entry-ast ast options)
source

-pointerclj/s

(-pointer id schema options)
source

-properties-and-optionsclj/s

(-properties-and-options properties options f)
source

-property-registryclj/s

(-property-registry m options f)
source

-proxy-schemaclj/s

(-proxy-schema {:keys [type min max childs type-properties fn]})
source

-qualified-keyword-predclj/s

(-qualified-keyword-pred properties)
source

-qualified-keyword-schemaclj/s

(-qualified-keyword-schema)
source

-qualified-symbol-schemaclj/s

(-qualified-symbol-schema)
source

-raw-formclj/s

(-raw-form type properties children)
source

-re-schemaclj/s

(-re-schema class?)
source

-ref-schemaclj/s

(-ref-schema)
(-ref-schema {:keys [lazy type-properties]})
source

-ref-schema?clj/s

(-ref-schema? x)
source

-reference?clj/s

(-reference? ?schema)
source

-register-function-schema!clj/s

(-register-function-schema! ns name ?schema data)
(-register-function-schema! ns name ?schema data key f)
source

-registryclj/s

(-registry)
(-registry {:keys [registry]})
source

-safe-predclj/s

(-safe-pred f)
source

-schema-schemaclj/s

(-schema-schema {:keys [id raw]})
source

-sequence-entry-schemaclj/s

(-sequence-entry-schema {:keys [type re-validator re-explainer re-parser
                                re-unparser re-transformer re-min-max]
                         {:keys [min max keep]} :child-bounds
                         :as opts})
source

-sequence-schemaclj/s

(-sequence-schema {:keys [type re-validator re-explainer re-parser re-unparser
                          re-transformer re-min-max]
                   {:keys [min max]} :child-bounds})
source

-set-assoc-childrenclj/s

(-set-assoc-children schema key value)
source

-set-childrenclj/s

(-set-children schema children)
source

-set-entriesclj/s

(-set-entries schema ?key value)
source

-set-propertiesclj/s

(-set-properties schema properties)
source

-simple-entry-parserclj/s

(-simple-entry-parser keyset children forms)
source

-simple-formclj/s

(-simple-form parent properties children f options)
source

-simple-schemaclj/s

(-simple-schema props)
source

-some-schemaclj/s

(-some-schema)
source

-string-schemaclj/s

(-string-schema)
source

-symbol-schemaclj/s

(-symbol-schema)
source

-to-child-astclj/s

(-to-child-ast schema)
source

-to-type-astclj/s

(-to-type-ast schema)
source

-to-value-astclj/s

(-to-value-ast schema)
source

-transformer?clj/s

(-transformer? x)
source

-tuple-schemaclj/s

(-tuple-schema)
(-tuple-schema opts)
source

-tuple-transformerclj/s

(-tuple-transformer ts)
source

-unlift-keysclj/s

(-unlift-keys m prefix)
source

-updateclj/s

(-update x k f)
source

-update-optionsclj/s

(-update-options schema f)
source

-update-propertiesclj/s

(-update-properties schema f & args)
source

-uuid-schemaclj/s

(-uuid-schema)
source

-val-schemaclj/s

(-val-schema)
(-val-schema schema properties)
source

-validate-bounded-limitsclj/s

(-validate-bounded-limits needed min max)
source

-validate-limitsclj/s

(-validate-limits min max)
source

-vmapclj/s

(-vmap os)
(-vmap f os)
source

-walk-entriesclj/s

(-walk-entries schema walker path options)
source

-walk-indexedclj/s

(-walk-indexed schema walker path options)
source

-walk-leafclj/s

(-walk-leaf schema walker path options)
source

=>clj/smacro

(=> given-sym value)
source

assertclj/smacro

(assert ?schema value)
(assert ?schema value options)

Assert that value validates against schema ?schema, or throws ExceptionInfo. The var clojure.core/assert determines whether assertion are checked.

Assert that `value` validates against schema `?schema`, or throws ExceptionInfo.
The var clojure.core/*assert* determines whether assertion are checked.
sourceraw docstring

ASTclj/sprotocol

-from-astclj/s

(-from-ast this ast options)

ast to schema

ast to schema

-to-astclj/s

(-to-ast this options)

schema to ast

schema to ast
source

astclj/s

(ast ?schema)
(ast ?schema options)

Returns the Schema AST

Returns the Schema AST
sourceraw docstring

base-schemasclj/s

(base-schemas)
source

Cachedclj/sprotocol

-cacheclj/s

(-cache this)
source

childrenclj/s

(children ?schema)
(children ?schema options)

Returns the Schema children with all Child Schemas resolved. For MapEntry Schemas, returns a always tuple3 of key ?properties child

Returns the Schema children with all Child Schemas resolved. For
`MapEntry` Schemas, returns a always tuple3 of `key ?properties child`
sourceraw docstring

children-schemaclj/s

(children-schema ?schema)
(children-schema ?schema options)

Returns children schema for Schema or IntoSchema.

Returns children schema for Schema or IntoSchema.
sourceraw docstring

class-schemasclj/s

(class-schemas)
source

coerceclj/s

(coerce ?schema value)
(coerce ?schema value transformer)
(coerce ?schema value transformer options)
(coerce ?schema value transformer respond raise)
(coerce ?schema value transformer respond raise options)

Decode and validate a value, throws on validation error.

Decode and validate a value, throws on validation error.
sourceraw docstring

coercerclj/s

(coercer ?schema)
(coercer ?schema transformer)
(coercer ?schema transformer options)
(coercer ?schema transformer respond raise)
(coercer ?schema transformer respond raise options)

Creates a function to decode and validate a value, throws on validation error.

Creates a function to decode and validate a value, throws on validation error.
sourceraw docstring

comparator-schemasclj/s

(comparator-schemas)
source

decodeclj/s

(decode ?schema value t)
(decode ?schema value options t)

Transforms a value with a given decoding transformer against a schema.

Transforms a value with a given decoding transformer against a schema.
sourceraw docstring

decoderclj/s

(decoder ?schema t)
(decoder ?schema options t)

Creates a value decoding function given a transformer and a schema.

Creates a value decoding function given a transformer and a schema.
sourceraw docstring

default-registryclj/s

source

default-schemaclj/s

(default-schema ?schema)
(default-schema ?schema options)

Returns the default (::m/default) schema from EntrySchema

Returns the default (::m/default) schema from EntrySchema
sourceraw docstring

default-schemasclj/s

(default-schemas)
source

derefclj/s

(deref ?schema)
(deref ?schema options)

Derefs top-level RefSchemas or returns original Schema.

Derefs top-level `RefSchema`s or returns original Schema.
sourceraw docstring

deref-allclj/s

(deref-all ?schema)
(deref-all ?schema options)

Derefs top-level RefSchemas recursively or returns original Schema.

Derefs top-level `RefSchema`s recursively or returns original Schema.
sourceraw docstring

deref-recursiveclj/s

(deref-recursive ?schema)
(deref-recursive ?schema {:malli.core/keys [ref-key] :as options})

Derefs all schemas at all levels. Does not walk over :refs.

Derefs all schemas at all levels. Does not walk over `:ref`s.
sourceraw docstring

DistributiveSchemaclj/sprotocol

-distribute-to-childrenclj/s

(-distribute-to-children this f options)

-distributive-schema?clj/s

(-distributive-schema? this)
source

encodeclj/s

(encode ?schema value t)
(encode ?schema value options t)

Transforms a value with a given encoding transformer against a schema.

Transforms a value with a given encoding transformer against a schema.
sourceraw docstring

encoderclj/s

(encoder ?schema t)
(encoder ?schema options t)

Creates a value encoding transformer given a transformer and a schema.

Creates a value encoding transformer given a transformer and a schema.
sourceraw docstring

entriesclj/s

(entries ?schema)
(entries ?schema options)

Returns EntrySchema children as a sequence of clojure.lang/MapEntrys where the values child schemas wrapped in :malli.core/val Schemas, with the entry properties as properties.

Using entries enable usage of entry properties in walking and value transformation.

(def schema [:map [:x int?] [:y {:optional true} int?]])

(m/children schema) ; [[:x nil int?] ; [:y {:optional true} int?]]

(m/entries schema) ; [[:x [:malli.core/val int?]] ; [:y [:malli.core/val {:optional true} int?]]]

(map key (m/entries schema)) ; (:x :y)

Returns `EntrySchema` children as a sequence of `clojure.lang/MapEntry`s
where the values child schemas wrapped in `:malli.core/val` Schemas,
with the entry properties as properties.

Using `entries` enable usage of entry properties in walking and value
transformation.

   (def schema
     [:map
      [:x int?]
      [:y {:optional true} int?]])

   (m/children schema)
   ; [[:x nil int?]
   ;  [:y {:optional true} int?]]

   (m/entries schema)
   ; [[:x [:malli.core/val int?]]
   ;  [:y [:malli.core/val {:optional true} int?]]]

   (map key (m/entries schema))
   ; (:x :y)
sourceraw docstring

EntryParserclj/sprotocol

-entry-childrenclj/s

(-entry-children this)

-entry-entriesclj/s

(-entry-entries this)

-entry-formsclj/s

(-entry-forms this)

-entry-keysetclj/s

(-entry-keyset this)
source

EntrySchemaclj/sprotocol

-entriesclj/s

(-entries this)

returns sequence of key -val-schema entries

returns sequence of `key -val-schema` entries

-entry-parserclj/s

(-entry-parser this)
source

evalclj/s

(eval ?code)
(eval ?code options)
source

explainclj/s

(explain ?schema value)
(explain ?schema value options)

Explains a value against a given schema. Creates the explainer for every call. When performance matters, (re-)use explainer instead.

Explains a value against a given schema. Creates the `explainer` for every call.
When performance matters, (re-)use `explainer` instead.
sourceraw docstring

explainerclj/s

(explainer ?schema)
(explainer ?schema options)

Returns an pure explainer function of type x -> explanation for a given Schema. Caches the result for Cached Schemas with key :explainer.

Returns an pure explainer function of type `x -> explanation` for a given Schema.
Caches the result for [[Cached]] Schemas with key `:explainer`.
sourceraw docstring

explicit-keysclj/s

(explicit-keys ?schema)
(explicit-keys ?schema options)

Returns a vector of explicit (not ::m/default) keys from EntrySchema

Returns a vector of explicit (not ::m/default) keys from EntrySchema
sourceraw docstring

formclj/s

(form ?schema)
(form ?schema options)

Returns the Schema form

Returns the Schema form
sourceraw docstring

from-astclj/s

(from-ast ?ast)
(from-ast ?ast options)

Creates a Schema from AST

Creates a Schema from AST
sourceraw docstring

function-schemaclj/s

(function-schema ?schema)
(function-schema ?schema options)
source

function-schemasclj/s

(function-schemas)
(function-schemas key)
source

FunctionSchemaclj/sprotocol

-function-infoclj/s

(-function-info this)

-function-schema-aritiesclj/s

(-function-schema-arities this)

-function-schema?clj/s

(-function-schema? this)

-instrument-fclj/s

(-instrument-f schema props f options)
source

into-schemaclj/s

(into-schema type properties children)
(into-schema type properties children options)

Creates a Schema instance out of type, optional properties map and children

Creates a Schema instance out of type, optional properties map and children
sourceraw docstring

into-schema?clj/s

(into-schema? x)

Checks if x is a IntoSchema instance

Checks if x is a IntoSchema instance
sourceraw docstring

IntoSchemaclj/sprotocol

-children-schemaclj/s

(-children-schema this options)

maybe returns sequence schema describing schema children

maybe returns sequence schema describing schema children

-into-schemaclj/s

(-into-schema this properties children options)

creates a new schema instance

creates a new schema instance

-properties-schemaclj/s

(-properties-schema this options)

maybe returns :map schema describing schema properties

maybe returns :map schema describing schema properties

-typeclj/s

(-type this)

returns type of the schema

returns type of the schema

-type-propertiesclj/s

(-type-properties this)

returns schema type properties

returns schema type properties
source

LensSchemaclj/sprotocol

-getclj/s

(-get this key default)

returns schema at key

returns schema at key

-keepclj/s

(-keep this)

returns truthy if schema contributes to value path

returns truthy if schema contributes to value path

-setclj/s

(-set this key value)

returns a copy with key having new value

returns a copy with key having new value
source

optionsclj/s

(options ?schema)
(options ?schema options)

Returns options used in creating the Schema

Returns options used in creating the Schema
sourceraw docstring

parentclj/s

(parent ?schema)
(parent ?schema options)

Returns the IntoSchema instance that created the Schema

Returns the IntoSchema instance that created the Schema
sourceraw docstring

parseclj/s

(parse ?schema value)
(parse ?schema value options)

parses a value against a given schema. Creates the parser for every call. When performance matters, (re-)use parser instead.

parses a value against a given schema. Creates the `parser` for every call.
When performance matters, (re-)use `parser` instead.
sourceraw docstring

parserclj/s

(parser ?schema)
(parser ?schema options)

Returns an pure parser function of type x -> either parsed-x ::invalid for a given Schema. Caches the result for Cached Schemas with key :parser.

Returns an pure parser function of type `x -> either parsed-x ::invalid` for a given Schema.
Caches the result for [[Cached]] Schemas with key `:parser`.
sourceraw docstring

predicate-schemasclj/s

(predicate-schemas)
source

propertiesclj/s

(properties ?schema)
(properties ?schema options)

Returns the Schema properties

Returns the Schema properties
sourceraw docstring

properties-schemaclj/s

(properties-schema ?schema)
(properties-schema ?schema options)

Returns properties schema for Schema or IntoSchema.

Returns properties schema for Schema or IntoSchema.
sourceraw docstring

RefSchemaclj/sprotocol

-derefclj/s

(-deref this)

returns the referenced schema

returns the referenced schema

-refclj/s

(-ref this)

returns the reference name

returns the reference name
source

RegexSchemaclj/sprotocol

-regex-explainerclj/s

(-regex-explainer this path)

returns the raw internal regex explainer implementation

returns the raw internal regex explainer implementation

-regex-min-maxclj/s

(-regex-min-max this nested?)

returns size of the sequence as {:min min :max max}. nil max means unbounded. nested? is true when this schema is nested inside an outer regex schema.

returns size of the sequence as {:min min :max max}. nil max means unbounded. nested? is true when this schema is nested inside an outer regex schema.

-regex-op?clj/s

(-regex-op? this)

is this a regex operator (e.g. :cat, :*...)

is this a regex operator (e.g. :cat, :*...)

-regex-parserclj/s

(-regex-parser this)

returns the raw internal regex parser implementation

returns the raw internal regex parser implementation

-regex-transformerclj/s

(-regex-transformer this transformer method options)

returns the raw internal regex transformer implementation

returns the raw internal regex transformer implementation

-regex-unparserclj/s

(-regex-unparser this)

returns the raw internal regex unparser implementation

returns the raw internal regex unparser implementation

-regex-validatorclj/s

(-regex-validator this)

returns the raw internal regex validator implementation

returns the raw internal regex validator implementation
source

Schemaclj/sprotocol

-validatorclj/s

(-validator this)

returns a predicate function that checks if the schema is valid

returns a predicate function that checks if the schema is valid

-optionsclj/s

(-options this)

returns original options

returns original options

-transformerclj/s

(-transformer this transformer method options)

returns a function to transform the value for the given schema and method. Can also return nil instead of identity so that more no-op transforms can be elided.

returns a function to transform the value for the given schema and method.
Can also return nil instead of `identity` so that more no-op transforms can be elided.

-walkclj/s

(-walk this walker path options)

walks the schema and it's children, ::m/walk-entry-vals, ::m/walk-refs, ::m/walk-schema-refs options effect how walking is done.

walks the schema and it's children, ::m/walk-entry-vals, ::m/walk-refs, ::m/walk-schema-refs options effect how walking is done.

-parserclj/s

(-parser this)

return a function of x -> parsed-x | ::m/invalid to explain how schema is valid.

return a function of `x -> parsed-x | ::m/invalid` to explain how schema is valid.

-propertiesclj/s

(-properties this)

returns original schema properties

returns original schema properties

-childrenclj/s

(-children this)

returns schema children

returns schema children

-formclj/s

(-form this)

returns original form of the schema

returns original form of the schema

-explainerclj/s

(-explainer this path)

returns a function of x in acc -> maybe errors to explain the errors for invalid values

returns a function of `x in acc -> maybe errors` to explain the errors for invalid values

-unparserclj/s

(-unparser this)

return the inverse (partial) function wrt. -parser; parsed-x -> x | ::m/invalid

return the inverse (partial) function wrt. `-parser`; `parsed-x -> x | ::m/invalid`

-parentclj/s

(-parent this)

returns the IntoSchema instance

returns the IntoSchema instance
source

schemaclj/s

(schema ?schema)
(schema ?schema options)

Creates a Schema object from any of the following:

  • Schema instance (just returns it)
  • IntoSchema instance
  • Schema vector syntax, e.g. [:string {:min 1}]
  • Qualified Keyword or String, using a registry lookup
Creates a Schema object from any of the following:

- Schema instance (just returns it)
- IntoSchema instance
- Schema vector syntax, e.g. [:string {:min 1}]
- Qualified Keyword or String, using a registry lookup
sourceraw docstring

schema-walkerclj/s

(schema-walker f)
source

schema?clj/s

(schema? x)

Checks if x is a Schema instance

Checks if x is a Schema instance
sourceraw docstring

sequence-schemasclj/s

(sequence-schemas)
source

Transformerclj/sprotocol

-transformer-chainclj/s

(-transformer-chain this)

returns transformer chain as a vector of maps with :name, :encoders, :decoders and :options

returns transformer chain as a vector of maps with :name, :encoders, :decoders and :options

-value-transformerclj/s

(-value-transformer this schema method options)

returns a value transforming interceptor for the given schema and method

returns a value transforming interceptor for the given schema and method
source

typeclj/s

(type ?schema)
(type ?schema options)

Returns the Schema type.

Returns the Schema type.
sourceraw docstring

type-propertiesclj/s

(type-properties ?schema)
(type-properties ?schema options)

Returns the Schema type properties

Returns the Schema type properties
sourceraw docstring

type-schemasclj/s

(type-schemas)
source

unparseclj/s

(unparse ?schema value)
(unparse ?schema value options)

Unparses a value against a given schema. Creates the unparser for every call. When performance matters, (re-)use unparser instead.

Unparses a value against a given schema. Creates the `unparser` for every call.
When performance matters, (re-)use `unparser` instead.
sourceraw docstring

unparserclj/s

(unparser ?schema)
(unparser ?schema options)

Returns an pure unparser function of type parsed-x -> either x ::invalid for a given Schema. Caches the result for Cached Schemas with key :unparser.

Returns an pure unparser function of type `parsed-x -> either x ::invalid` for a given Schema.
Caches the result for [[Cached]] Schemas with key `:unparser`.
sourceraw docstring

validateclj/s

(validate ?schema value)
(validate ?schema value options)

Returns true if value is valid according to given schema. Creates the validator for every call. When performance matters, (re-)use validator instead.

Returns true if value is valid according to given schema. Creates the `validator`
for every call. When performance matters, (re-)use `validator` instead.
sourceraw docstring

validatorclj/s

(validator ?schema)
(validator ?schema options)

Returns an pure validation function of type x -> boolean for a given Schema. Caches the result for Cached Schemas with key :validator.

Returns an pure validation function of type `x -> boolean` for a given Schema.
Caches the result for [[Cached]] Schemas with key `:validator`.
sourceraw docstring

walkclj/s

(walk ?schema f)
(walk ?schema f options)

Postwalks recursively over the Schema and it's children. The walker callback is a arity4 function with the following arguments: schema, path, (walked) children and options.

Postwalks recursively over the Schema and it's children.
The walker callback is a arity4 function with the following
arguments: schema, path, (walked) children and options.
sourceraw docstring

Walkerclj/sprotocol

-acceptclj/s

(-accept this schema path options)

-innerclj/s

(-inner this schema path options)

-outerclj/s

(-outer this schema path children options)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close