field_format {validate}R Documentation

Check whether a field conforms to a regular expression

Description

A convenience wrapper around grepl to make rule sets more readable.

Usage

field_format(x, pattern, type = c("glob", "regex"), ...)

Arguments

x

Bare (unquoted) name of a variable. Otherwise a vector of class character. Coerced to character as necessary.

pattern

[character] a regular expression

type

[character] How to interpret pattern. In globbing, the asterisk (‘*') is used as a wildcard that stands for ’zero or more characters'.

...

passed to grepl

See Also

Other format-checkers: field_length(), number_format()


[Package validate version 1.1.5 Index]