e164 function

LivrRule e164(
  1. List<Object?> args,
  2. RuleContext context
)

e164: the value must be a phone number in the E.164 format: +, then 7 to 15 digits, the first one is not 0. The output is the value as a string.

Implementation

LivrRule e164(List<Object?> args, RuleContext context) {
  if (args.isNotEmpty) {
    throw const LivrSchemaException('Rule [e164] takes no arguments');
  }
  return _e164;
}