isValid method

  1. @override
bool isValid(
  1. String value
)
override

Implementation

@override
bool isValid(String value) {
  String v = strip(value);

  if (v.isEmpty) {
    return false;
  }

  return (v.length > 11)
      ? CNPJValidator.isValid(v, false)
      : CPFValidator.isValid(v, false);
}