platform/packages/validate/lib/protevus_validate.dart

15 lines
430 B
Dart
Raw Normal View History

2021-02-14 05:22:25 +00:00
/// Cross-platform validation library based on `matcher`.
library protevus_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(', ');