Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated docs #1

Merged
merged 9 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ A very simple package to help you write robust, reusable and extendable validati

[![Alt text](https://raw.githubusercontent.com/sarkarshuvojit/form_warden/main/example/warden.png "Example Application")](https://github.com/sarkarshuvojit/form_warden/tree/main/example)

## How it works

### Building Blocks

Create simple or complex blocks of validation, and compose those building blocks to create flutter validators.
Each block will have it's own logic, a set of args to create dynamic validators & specific error messages for each block.

<img src="docs/images/single-validator.svg" width="450">

There are simple ones, configurable ones and even you can create validations aligned to the domain of the app.

![Building Block](docs/images/building-blocks.svg)

### Creating a warden

A warden will be a collection of validation blocks. Examples of enum & email pattern checking is added below.

![Building Block](docs/images/enum.svg)

![Building Block](docs/images/email.svg)


## Installation

To use this package, add `form_warden` as a [dependency in your pubspec.yaml](https://flutter.dev/docs/development/packages-and-plugins/using-packages) file.
Expand Down Expand Up @@ -127,4 +149,4 @@ TextFormField(

[MIT](https://choosealicense.com/licenses/mit/)



20 changes: 20 additions & 0 deletions docs/images/building-blocks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/images/email.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/images/enum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/images/single-validator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading