angel3_validate 8.2.0 copy "angel3_validate: ^8.2.0" to clipboard
angel3_validate: ^8.2.0 copied to clipboard

Cross-platform HTTP request body validator library based on `matcher`.

example/main.dart

import 'package:angel3_validate/angel3_validate.dart';

void main() {
  var bio = Validator({
    'age*': [isInt, greaterThanOrEqualTo(0)],
    'birthYear*': isInt,
    'countryOfOrigin': isString
  });

  var book = Validator({
    'title*': isString,
    'year*': [
      isNum,
      (year) {
        return year <= DateTime.now().year;
      }
    ]
  });

  // ignore: unused_local_variable
  var author = Validator({
    'bio*': bio,
    'books*': [isList, everyElement(book)]
  }, defaultValues: {
    'books': []
  });
}
2
likes
160
points
482
downloads

Publisher

verified publisherdukefirehawk.com

Weekly Downloads

Cross-platform HTTP request body validator library based on `matcher`.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

angel3_framework, angel3_http_exception, matcher

More

Packages that depend on angel3_validate