Liking cljdoc? Tell your friends :D

reagent-dnd.validate

cljs

Stolen in its entirety from https://github.com/Day8/re-com

Stolen in its entirety from https://github.com/Day8/re-com
raw docstring

alert-type?cljs

(alert-type? arg)

alert-typescljs


alert-types-listcljs


align-optionscljs


align-options-listcljs


align-style?cljs

(align-style? arg)

arg-names-valid?cljs

(arg-names-valid? defined-args passed-args)

returns true if every passed-args is value. Otherwise log the problem and return false

returns true if every passed-args is value. Otherwise log the problem and return false
raw docstring

button-size?cljs

(button-size? arg)

button-sizescljs


button-sizes-listcljs


css-style?cljs

(css-style? arg)

Returns true if the passed argument is a valid CSS style. Otherwise returns a warning map

Returns true if the passed argument is a valid CSS style.
Otherwise returns a warning map
raw docstring

css-stylescljs


extension-attribute?cljs

(extension-attribute? attr)

Returns truthy if the attribute name is an extension attribute, that is data-* or aria-*, otherwise falsey.

Returns truthy if the attribute name is an extension attribute, that is data-* or aria-*, otherwise falsey.
raw docstring

extension-attrscljs


extract-arg-datacljs

(extract-arg-data args-desc)

Package up all the relevant data for validation purposes from the xxx-args-desc map into a new map

Package up all the relevant data for validation purposes from the xxx-args-desc map into a new map
raw docstring

goog-date?cljs

(goog-date? arg)

Returns true if the passed argument is a valid goog.date.UtcDateTime, otherwise false/error

Returns true if the passed argument is a valid goog.date.UtcDateTime, otherwise false/error
raw docstring

hash-map-with-name-keyscljs

(hash-map-with-name-keys v)

html-attr?cljs

(html-attr? arg)

Returns true if the passed argument is a valid HTML, SVG or event attribute. Otherwise returns a warning map. Notes:

  • Prevents :class and :style attributes
Returns true if the passed argument is a valid HTML, SVG or event attribute.
Otherwise returns a warning map.
Notes:
 - Prevents :class and :style attributes
raw docstring

html-attrscljs


input-status-type?cljs

(input-status-type? arg)

input-status-typescljs


input-status-types-listcljs


invalid-html-attrscljs

(invalid-html-attrs attrs)

Returns the subset of HTML attributes contained in the passed argument that are not valid HTML attributes.

Returns the subset of HTML attributes contained in the passed argument that are not valid HTML attributes.
raw docstring

justify-optionscljs


justify-options-listcljs


justify-style?cljs

(justify-style? arg)

left-stringcljs

(left-string obj max-len)

Converts obj to a string and truncates it to max-len chars if necessary. When truncation is necessary, adds an elipsis to the end

Converts obj to a string and truncates it to max-len chars if necessary.
When truncation is necessary, adds an elipsis to the end
raw docstring

log-errorcljs

(log-error & args)

Sends a message to the DeV Tools console as an error. Returns false to indicate 'error' condition

Sends a message to the DeV Tools console as an error. Returns false to indicate 'error' condition
raw docstring

log-warningcljs

(log-warning & args)

Sends a message to the DeV Tools console as an warning. Returns true to indicate 'not and error' condition

Sends a message to the DeV Tools console as an warning. Returns true to indicate 'not and error' condition
raw docstring

make-code-listcljs

(make-code-list codes)

Given a vector or list of codes, create a [:span] hiccup vector containing a comma separated list of the codes

Given a vector or list of codes, create a [:span] hiccup vector containing a comma separated list of the codes
raw docstring

number-or-string?cljs

(number-or-string? arg)

Returns true if the passed argument is a number or a string, otherwise false/error

Returns true if the passed argument is a number or a string, otherwise false/error
raw docstring

popover-status-type?cljs

(popover-status-type? arg)

popover-status-typescljs


popover-status-types-listcljs


position-optionscljs


position-options-listcljs


position?cljs

(position? arg)

regex?cljs

(regex? arg)

Returns true if the passed argument is a valid regular expression, otherwise false/error

Returns true if the passed argument is a valid regular expression, otherwise false/error
raw docstring

required-args-passed?cljs

(required-args-passed? required-args passed-args)

returns true if all the required args are supplied. Otherwise log the error and return false

returns true if all the required args are supplied. Otherwise log the error and return false
raw docstring

scroll-optionscljs


scroll-options-listcljs


scroll-style?cljs

(scroll-style? arg)

set-or-atom?cljs

(set-or-atom? arg)

Returns true if the passed argument is a set (or a set within an atom), otherwise false/error

Returns true if the passed argument is a set (or a set within an atom), otherwise false/error
raw docstring

string-or-atom?cljs

(string-or-atom? arg)

Returns true if the passed argument is a string (or a string within an atom), otherwise false/error

Returns true if the passed argument is a string (or a string within an atom), otherwise false/error
raw docstring

string-or-hiccup?cljs

(string-or-hiccup? arg)

Returns true if the passed argument is either valid hiccup or a string, otherwise false/error

Returns true if the passed argument is either valid hiccup or a string, otherwise false/error
raw docstring

throbber-size?cljs

(throbber-size? arg)

throbber-sizescljs


throbber-sizes-listcljs


title-level-type?cljs

(title-level-type? arg)

title-levelscljs


title-levels-listcljs


validate-arg-against-setcljs

(validate-arg-against-set arg arg-name valid-set)

Validates the passed argument against the expected set

Validates the passed argument against the expected set
raw docstring

validate-argscljs

(validate-args arg-defs passed-args & component-name)

Calls three validation tests:

  • Are arg names valid?
  • Have all required args been passed?
  • Specific valiadation function calls to check arg values if specified If they all pass, returns true. Normally used for a call to the {:pre...} at the beginning of a function
Calls three validation tests:
 - Are arg names valid?
 - Have all required args been passed?
 - Specific valiadation function calls to check arg values if specified
If they all pass, returns true.
Normally used for a call to the {:pre...} at the beginning of a function
raw docstring

validate-args-macroclj/smacro

(validate-args-macro args-desc args component-name)

if goog.DEBUG is true then validate the args, otherwise replace the validation code with true for production builds which the {:pre ...} will be happy with

if goog.DEBUG is true then validate the args, otherwise replace the validation code with true
for production builds which the {:pre ...} will be happy with
raw docstring

validate-fns-pass?cljs

(validate-fns-pass? args-with-validators passed-args component-name)

Gathers together a list of args that have a validator and... returns true if all argument values are valid OR are just warnings (log warning to the console). Otherwise log an error to the console and return false. Validation functions can return: - true: validation success - false: validation failed - use standard error message - map: validation failed - includes two keys: :status - :error: log to console as error :warning: log to console as warning :message - use this string in the message of the warning/error

Gathers together a list of args that have a validator and...
returns true if all argument values are valid OR are just warnings (log warning to the console).
Otherwise log an error to the console and return false.
Validation functions can return:
      - true:   validation success
      - false:  validation failed - use standard error message
      - map:    validation failed - includes two keys:
                                      :status  - :error:   log to console as error
                                                 :warning: log to console as warning
                                      :message - use this string in the message of the warning/error
raw docstring

vector-of-maps?cljs

(vector-of-maps? arg)

Returns true if the passed argument is a vector of maps (either directly or contained in an atom), otherwise false/error Notes:

  • actually it also accepts a list of maps (should we rename this? Potential long/ugly names: sequential-of-maps?, vector-or-list-of-maps?)
  • vector/list can be empty
  • only checks the first element in the vector/list
Returns true if the passed argument is a vector of maps (either directly or contained in an atom), otherwise false/error
Notes:
 - actually it also accepts a list of maps (should we rename this? Potential long/ugly names: sequential-of-maps?, vector-or-list-of-maps?)
 - vector/list can be empty
 - only checks the first element in the vector/list
raw docstring

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

× close