Skip to content

Commit 51bd2b7

Browse files
committed
Update README.md
1 parent 4fdf893 commit 51bd2b7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Features
1717
- immutable, you can share mapping definition object safely
1818

1919

20-
Usage & desc
20+
Usage & Desc
2121
-------------
2222
![form-binder description](https://github.com/tminglei/form-binder/raw/master/form-binder-desc.png)
2323

24-
#### Major components:
24+
#### Major Components:
2525
[1] **binder**: facade, two major methods: `bind`, `validate`
2626
[2] **messages**: `(String) => String`, *(messageKey) => message*
2727
[3] **mapping**: used to validate/convert data
@@ -40,15 +40,15 @@ binder **validate**, _validate only_ and not consume converted data, method sign
4040
def validate[T](mapping: Mapping[T], data: Map[String, String], touched: Option[Seq[String]] = None)
4141
```
4242

43-
#### Extention points:
43+
#### Extension Points:
4444
(1) **BulkPreProcessor**: `(Map[String, String]) => Map[String, String]`, *data => data*
4545
(2) **PostErrProcessor**: `(Seq[(String, String)]) => R`, *errors => R*
4646
(3) **TouchedExtractor**: `(Map[String, String]) => Seq[String]`, *data => touched items*
4747
(4) **PreProcessor**: `(String) => String`, *(input) => output*
4848
(5) **Constraint**: `(String, String, Messages) => Option[String]`, *(label, vString, messages) => [error]*
4949
(6) **ExtraConstraint**: `(String, T, Messages) => Seq[(String, String)]`, *(label, vObject, messages) => errors*
5050

51-
#### Options and others:
51+
#### Options & Others:
5252
1) **label**: `feature`, readable name for current group/field
5353
2) **mapTo**: `feature`, map converted value to another type
5454
3) **eagerCheck**: `option`, check errors as more as possiable
@@ -58,7 +58,7 @@ def validate[T](mapping: Mapping[T], data: Map[String, String], touched: Option[
5858
_* By default, form-binder would return when encountered a validation error._
5959
_** ignoreEmpty + touched, will let form-binder re-check touched empty field/values_
6060

61-
For more `form-binder` details, pls check the [codes](https://github.com/tminglei/form-binder/tree/master/src/main/scala/com/github/tminglei/bind) and [tests](https://github.com/tminglei/form-binder/tree/master/src/test/scala/com/github/tminglei/bind).
61+
For `form-binder` more details, pls check the [codes](https://github.com/tminglei/form-binder/tree/master/src/main/scala/com/github/tminglei/bind) and [tests](https://github.com/tminglei/form-binder/tree/master/src/test/scala/com/github/tminglei/bind).
6262
For `form-binder`/`Scalatra` integration, pls see [here](https://github.com/tminglei/form-binder/tree/master/integrations/scalatra).
6363

6464

0 commit comments

Comments
 (0)