refactor: refactored validate > validation

This commit is contained in:
Patrick Stewart 2024-12-15 12:58:42 -07:00
parent 7a680c5017
commit ce6c4c56fa
21 changed files with 15 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# Angel3 Validate # 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) [![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) [![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) [![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 ### Creating a Validator
```dart ```dart
import 'package:angel3_validate/angel3_validate.dart'; import 'package:platform_validation/platform_validation.dart';
main() { main() {
var validator = Validator({ var validator = Validator({
@ -131,7 +131,7 @@ main() {
### Custom Error Messages ### 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 ```dart
Validator({ Validator({
@ -270,7 +270,7 @@ main() {
```dart ```dart
import 'package:angel3_framework/angel3_framework.dart'; import 'package:angel3_framework/angel3_framework.dart';
import 'package:angel3_validate/server.dart'; import 'package:platform_validation/server.dart';
final Validator echo = Validator({ final Validator echo = Validator({
'message*': (String message) => message.length >= 5 'message*': (String message) => message.length >= 5

View file

@ -1,4 +1,4 @@
import 'package:angel3_validate/angel3_validate.dart'; import 'package:platform_validation/platform_validation.dart';
void main() { void main() {
var bio = Validator({ var bio = Validator({

View file

@ -1,5 +1,5 @@
/// Cross-platform validation library based on `matcher`. /// Cross-platform validation library based on `matcher`.
library angel3_validate; library platform_validation;
export 'package:matcher/matcher.dart'; export 'package:matcher/matcher.dart';
export 'src/context_aware.dart'; export 'src/context_aware.dart';

View file

@ -1,13 +1,13 @@
/// Support for using `angel_validate` with the Angel Framework. /// Support for using `angel_validate` with the Angel Framework.
library angel3_validate.server; library platform_validation.server;
import 'dart:async'; import 'dart:async';
import 'package:platform_foundation/core.dart'; import 'package:platform_foundation/core.dart';
import 'src/async.dart'; import 'src/async.dart';
import 'angel3_validate.dart'; import 'platform_validation.dart';
export 'src/async.dart'; export 'src/async.dart';
export 'angel3_validate.dart'; export 'platform_validation.dart';
/// Auto-parses numbers in `req.bodyAsMap`. /// Auto-parses numbers in `req.bodyAsMap`.
RequestHandler autoParseBody(List<String> fields) { RequestHandler autoParseBody(List<String> fields) {

View file

@ -1,4 +1,4 @@
name: angel3_validate name: platform_validation
description: Cross-platform HTTP request body validator library based on `matcher`. description: Cross-platform HTTP request body validator library based on `matcher`.
version: 8.2.0 version: 8.2.0
homepage: https://angel3-framework.web.app/ homepage: https://angel3-framework.web.app/

View file

@ -1,4 +1,4 @@
import 'package:angel3_validate/angel3_validate.dart'; import 'package:platform_validation/platform_validation.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
final Validator emailSchema = final Validator emailSchema =

View file

@ -1,4 +1,4 @@
import 'package:angel3_validate/angel3_validate.dart'; import 'package:platform_validation/platform_validation.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
void main() { void main() {

View file

@ -4,7 +4,7 @@ import 'dart:convert';
import 'package:platform_foundation/core.dart'; import 'package:platform_foundation/core.dart';
import 'package:platform_foundation/http.dart'; import 'package:platform_foundation/http.dart';
//import 'package:angel_test/angel_test.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:logging/logging.dart';
import 'package:platform_testing/http.dart'; import 'package:platform_testing/http.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';

View file

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>angel3_validate</title> <title>platform_validation</title>
<meta name="viewport" <meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<style> <style>

View file

@ -1,6 +1,6 @@
import 'dart:html'; import 'dart:html';
import 'package:angel3_validate/angel3_validate.dart'; import 'package:platform_validation/platform_validation.dart';
final $errors = querySelector('#errors') as UListElement?; final $errors = querySelector('#errors') as UListElement?;
final $form = querySelector('#form') as FormElement?; final $form = querySelector('#form') as FormElement?;