galileo_validate 3.0.1 copy "galileo_validate: ^3.0.1" to clipboard
galileo_validate: ^3.0.1 copied to clipboard

Cross-platform request body validation library based on `matcher`.

example/main.dart

import 'package:galileo_validate/galileo_validate.dart';

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': []
  });
}
0
likes
40
points
24
downloads

Publisher

verified publishergalileodart.com

Weekly Downloads

Cross-platform request body validation library based on `matcher`.

Repository (GitHub)

License

MIT (license)

Dependencies

galileo_framework, galileo_http_exception, matcher

More

Packages that depend on galileo_validate