platform/packages/validate/lib/angel3_validate.dart

15 lines
428 B
Dart
Raw Normal View History

2021-02-14 05:22:25 +00:00
/// Cross-platform validation library based on `matcher`.
2021-05-14 11:47:44 +00:00
library angel3_validate;
2021-02-14 05:22:25 +00:00
export 'package:matcher/matcher.dart';
export 'src/context_aware.dart';
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(', ');