Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MalekKamel committed Aug 14, 2022
1 parent 6c03566 commit 8ca50b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ For fast validation, you can use `InlineValidator` and provide your validation l

### Validation Types

You can choose between 2 different validation types: `FormValidation(validationType: .immediate)`
and `FormValidation(validationType: .deffered)`
You can choose between 3 different validation types: `FormValidation(validationType: .immediate)`
and `FormValidation(validationType: .deffered)` `FormValidation(validationType: .silent)`

1. **immediate**: the validation is triggered every time the field is changed. An error message will be shown in case
the value is invalid.
2. **deferred**: in this case, the validation will be triggered manually only using `FormValidation.triggerValidation()`
The error messages will be displayed only after triggering the validation manually.
3. **silent**: In this case, no validation message is displayed, and it's your responsibility to display them
using `FormValidation.validationMessages()`.

### Manual Validation

Expand Down
2 changes: 1 addition & 1 deletion Sources/FormValidation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public extension FormValidation {
/// message will be shown in case the value is invalid.
/// 2) deferred: in this case, the validation will be triggered manually only using `FormValidation.triggerValidation()`
/// The error messages will be displayed only after triggering the validation manually.
/// 3) silent: In this case, no validation message is displayed and it's your responsibility to display them
/// 3) silent: In this case, no validation message is displayed, and it's your responsibility to display them
/// using `FormValidation.validationMessages()`.
enum ValidationType {
case immediate
Expand Down

0 comments on commit 8ca50b8

Please sign in to comment.