xBacon v0.1.0 XBacon.Matchers.CPF

Defines matchers that validates CPF values.

Summary

Functions

Validates the given value as a CPF, in addition to the format validation it also verifies the integrity of the input, doing the calculations of the last two digits, called as verfier digits

Validates the given value on the following formats

Functions

strictly_valid?(value)

Validates the given value as a CPF, in addition to the format validation it also verifies the integrity of the input, doing the calculations of the last two digits, called as verfier digits.

Returns true if the value is matched against valid patterns otherwise, false.

valid?(value)

Validates the given value on the following formats:

  • xxx.xxx.xxx/xx
  • xxxxxxxxx-xx
  • xxxxxxxxxxx

    Returns true if the value is matched against valid patterns otherwise, false.