2016-12-25 21:26:55 +00:00
|
|
|
/// Cross-platform validation library based on `matcher`.
|
|
|
|
library angel_validate;
|
|
|
|
|
2016-12-26 01:09:24 +00:00
|
|
|
export 'package:matcher/matcher.dart';
|
|
|
|
export 'src/matchers.dart';
|
2018-06-28 02:34:05 +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(', ');
|