refactor: refactored validate > validation
This commit is contained in:
parent
7a680c5017
commit
ce6c4c56fa
21 changed files with 15 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
|||
# Angel3 Validate
|
||||
|
||||
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_validate?include_prereleases)
|
||||
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/platform_validation?include_prereleases)
|
||||
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||
[![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM)
|
||||
[![License](https://img.shields.io/github/license/dart-backend/angel)](https://github.com/dart-backend/angel/tree/master/packages/validate/LICENSE)
|
||||
|
@ -30,7 +30,7 @@ For convenience's sake, this library also exports `matcher`.
|
|||
### Creating a Validator
|
||||
|
||||
```dart
|
||||
import 'package:angel3_validate/angel3_validate.dart';
|
||||
import 'package:platform_validation/platform_validation.dart';
|
||||
|
||||
main() {
|
||||
var validator = Validator({
|
||||
|
@ -131,7 +131,7 @@ main() {
|
|||
|
||||
### Custom Error Messages
|
||||
|
||||
If these are not present, `angel3_validate` will *attempt* to generate a coherent error message on its own.
|
||||
If these are not present, `platform_validation` will *attempt* to generate a coherent error message on its own.
|
||||
|
||||
```dart
|
||||
Validator({
|
||||
|
@ -270,7 +270,7 @@ main() {
|
|||
|
||||
```dart
|
||||
import 'package:angel3_framework/angel3_framework.dart';
|
||||
import 'package:angel3_validate/server.dart';
|
||||
import 'package:platform_validation/server.dart';
|
||||
|
||||
final Validator echo = Validator({
|
||||
'message*': (String message) => message.length >= 5
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:angel3_validate/angel3_validate.dart';
|
||||
import 'package:platform_validation/platform_validation.dart';
|
||||
|
||||
void main() {
|
||||
var bio = Validator({
|
|
@ -1,5 +1,5 @@
|
|||
/// Cross-platform validation library based on `matcher`.
|
||||
library angel3_validate;
|
||||
library platform_validation;
|
||||
|
||||
export 'package:matcher/matcher.dart';
|
||||
export 'src/context_aware.dart';
|
|
@ -1,13 +1,13 @@
|
|||
/// Support for using `angel_validate` with the Angel Framework.
|
||||
library angel3_validate.server;
|
||||
library platform_validation.server;
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:platform_foundation/core.dart';
|
||||
import 'src/async.dart';
|
||||
import 'angel3_validate.dart';
|
||||
import 'platform_validation.dart';
|
||||
export 'src/async.dart';
|
||||
export 'angel3_validate.dart';
|
||||
export 'platform_validation.dart';
|
||||
|
||||
/// Auto-parses numbers in `req.bodyAsMap`.
|
||||
RequestHandler autoParseBody(List<String> fields) {
|
|
@ -1,4 +1,4 @@
|
|||
name: angel3_validate
|
||||
name: platform_validation
|
||||
description: Cross-platform HTTP request body validator library based on `matcher`.
|
||||
version: 8.2.0
|
||||
homepage: https://angel3-framework.web.app/
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:angel3_validate/angel3_validate.dart';
|
||||
import 'package:platform_validation/platform_validation.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
final Validator emailSchema =
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:angel3_validate/angel3_validate.dart';
|
||||
import 'package:platform_validation/platform_validation.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
|
@ -4,7 +4,7 @@ import 'dart:convert';
|
|||
import 'package:platform_foundation/core.dart';
|
||||
import 'package:platform_foundation/http.dart';
|
||||
//import 'package:angel_test/angel_test.dart';
|
||||
import 'package:angel3_validate/server.dart';
|
||||
import 'package:platform_validation/server.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:platform_testing/http.dart';
|
||||
import 'package:test/test.dart';
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>angel3_validate</title>
|
||||
<title>platform_validation</title>
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<style>
|
|
@ -1,6 +1,6 @@
|
|||
import 'dart:html';
|
||||
|
||||
import 'package:angel3_validate/angel3_validate.dart';
|
||||
import 'package:platform_validation/platform_validation.dart';
|
||||
|
||||
final $errors = querySelector('#errors') as UListElement?;
|
||||
final $form = querySelector('#form') as FormElement?;
|
Loading…
Reference in a new issue