semver function

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

semver: the value must be a version of Semantic Versioning 2.0.0, like 1.2.3, 1.0.0-rc.1 or 1.0.0+build.5, without a v prefix. The output is the value as a string.

Implementation

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