CrossClj

1.3.0 docs

SourceDocs



RECENT
    VARS
    +uuid-re+
    apply-validation
    boolean
    boolean-str
    build-step
    build-steps
    coll
    dissoc-in
    email
    every
    function
    identical-to
    in-range
    integer
    integer-str
    keyword
    map
    map'
    max-count
    member
    min-count
    negative
    normalize-step-entry
    normalize-step-map-entry
    notopts?
    number
    number-str
    opts-params
    positive
    prepare-message
    required
    set
    string
    string-like
    strip-values
    uuid
    uuid-str
    valid-single?
    valid?
    validate
    validate!
    validate-internal
    validate-single
    vector

    « Index of all namespaces of this project

    Private
    (apply-validation step data value)
    Private
    (build-step key item)
    Private
    (build-steps schema)
    Private
    (dissoc-in m [k & ks :as keys])
    Private
    (normalize-step-entry acc [key & values])
    Private
    (normalize-step-map-entry acc key value)
    Private
    (prepare-message opts step)
    Private
    (strip-values data steps)
    (valid-single? data schema)
    Analogous function to valid? that just validates single value.
    
    (valid? data schema)
    Return true if the data matches the schema, otherwise
    return false.
    (validate data schema)(validate data schema {:keys [strip], :or {strip false}, :as opts})
    Validate data with specified schema.
    
    This function by default strips all data that are not defined in
    schema, but this behavior can be changed by passing `{:strip false}`
    as third argument.
    (validate! data schema)(validate! data schema {:keys [message], :or {message "Schema validation error"}, :as opts})
    Analogous function to the validate that instead of return
    the errors, just raise a ex-info exception with errors in case
    them are or just return the validated data.
    
    This function accepts the same parameters as validate with
    an additional :message that serves for customize the exception
    message.
    Private
    (validate-internal data steps opts)
    (validate-single data schema)(validate-single data schema opts)
    A helper that used just for validate one value.