2021-02-14 05:22:25 +00:00
|
|
|
/// Cross-platform validation library based on `matcher`.
|
|
|
|
library angel_validate;
|
|
|
|
|
|
|
|
export 'package:matcher/matcher.dart';
|
|
|
|
export 'src/context_aware.dart';
|
2020-05-04 16:42:24 +00:00
|
|
|
export 'src/matchers.dart';
|
2021-02-14 05:22:25 +00:00
|
|
|
export 'src/validator.dart';
|
|
|
|
|
|
|
|
/// Marks a field name as required.
|
|
|
|
String requireField(String field) => '$field*';
|
|
|
|
|
|
|
|
/// Marks multiple fields as required.
|
|
|
|
String requireFields(Iterable<String> fields) =>
|
|
|
|
fields.map(requireField).join(', ');
|