Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
* Indented allowed error message placeholder so it's easier to read.
  • Loading branch information
hoshomoh authored Nov 18, 2018
1 parent 88d32a4 commit ba36651
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ $validator = new Validator("some/valid/file_path", ",", [
]);
```

In this above example, the `:attribute` place-holder will be replaced by the actual name of the field under validation. The `:value` place-holder will be replaced with value being validated. The `:line` place-holder will also be replaced with the row/line number in the CSV in which the error happened. You may also utilize other place-holders in validation messages. For example the `between` rule exposes two other placeholder `min` and `max`. Find more about this in the available rules section
In this above example:

The `:attribute` place-holder will be replaced by the actual name of the field under validation.
The `:value` place-holder will be replaced with value being validated.
The `:line` place-holder will also be replaced with the row/line number in the CSV in which the error happened.

You may also utilize other place-holders in validation messages. For example the `between` rule exposes two other placeholder `min` and `max`. Find more about this in the available rules section

##### Available rules

Expand Down

0 comments on commit ba36651

Please sign in to comment.