platform/lib/angel_validate.dart
2018-06-27 22:34:05 -04:00

13 lines
394 B
Dart

/// Cross-platform validation library based on `matcher`.
library angel_validate;
export 'package:matcher/matcher.dart';
export 'src/matchers.dart';
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(', ');