Predicates useful for validating input strings, such as ones from HTML forms. All predicates in this namespace are considered portable between different Clojure implementations.
Predicates useful for validating input strings, such as ones from HTML forms. All predicates in this namespace are considered portable between different Clojure implementations.
(alphanumeric? s)
Returns true if a string consists only of alphanumeric characters.
Returns true if a string consists only of alphanumeric characters.
(between min max)
Creates a predicate function for checking whether a number is between two values (inclusive).
Creates a predicate function for checking whether a number is between two values (inclusive).
(decimal-string? s)
Returns true if the string represents a decimal number.
Returns true if the string represents a decimal number.
(digits? s)
Returns true if a string consists only of numerical digits.
Returns true if a string consists only of numerical digits.
(email-address? email)
Returns true if the email address is valid, based on RFC 2822. Email addresses containing quotation marks or square brackets are considered invalid, as this syntax is not commonly supported in practise. The domain of the email address is not checked for validity.
Returns true if the email address is valid, based on RFC 2822. Email addresses containing quotation marks or square brackets are considered invalid, as this syntax is not commonly supported in practise. The domain of the email address is not checked for validity.
(gt n)
Creates a predicate function for checking if a value is numerically greater than the specified number.
Creates a predicate function for checking if a value is numerically greater than the specified number.
(gte n)
Creates a predicate function for checking if a value is numerically greater than or equal to the specified number.
Creates a predicate function for checking if a value is numerically greater than or equal to the specified number.
(integer-string? s)
Returns true if the string represents an integer.
Returns true if the string represents an integer.
(lt n)
Creates a predicate function for checking if a value is numerically less than the specified number.
Creates a predicate function for checking if a value is numerically less than the specified number.
(lte n)
Creates a predicate function for checking if a value is numerically less than or equal to the specified number.
Creates a predicate function for checking if a value is numerically less than or equal to the specified number.
(matches re)
Creates a predicate that returns true if the supplied regular expression matches its argument.
Creates a predicate that returns true if the supplied regular expression matches its argument.
(max-length max)
Creates a predicate that returns true if a string's length is less than or equal to the supplied maximum.
Creates a predicate that returns true if a string's length is less than or equal to the supplied maximum.
(min-length min)
Creates a predicate that returns true if a string's length is greater than or equal to the supplied minimum.
Creates a predicate that returns true if a string's length is greater than or equal to the supplied minimum.
(present? x)
Returns false if x is nil or blank, true otherwise.
Returns false if x is nil or blank, true otherwise.
(url? s)
Returns true if the string is a valid URL.
Returns true if the string is a valid URL.
Returns true if the domain of the supplied email address has a MX DNS entry.
Returns true if the domain of the supplied email address has a MX DNS entry.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close