platform/packages/validation/lib/platform_validation.dart
2024-12-15 12:58:42 -07:00

14 lines
432 B
Dart

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