Skip to content

Commit f47a940

Browse files
authored
Update README.md
1 parent 4dc5943 commit f47a940

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ The new `Input` module contains functions for the underlying System.CommandLine
7474
* `defFactory` assigns a default value factor to an `Option` or `Argument`
7575
* `required` marks an `Option` as required
7676
* `validate` allows you to return a `Result<unit, string>` for the parsed value
77+
* `validateFileExists` ensures that the `FileInfo` exists
78+
* `validateDirectoryExists` ensures that the `DirectoryInfo` exists
7779
* `addValidator` allows you to add a validator to the underlying `Option` or `Argument`
7880
* `editOption` allows you to pass a function to edit the underlying `Option`
7981
* `editArgument` allows you to pass a function to edit the underlying `Argument`
@@ -97,7 +99,7 @@ For example, this is how the existing `alias` and `desc` functions were created:
9799
* _Since `alias` can only apply to `Option`, it only calls `editOption`_
98100
* _Since `desc` can apply to both `Option` and `Argument`, you need to use both_
99101

100-
You could just as easily create a custom `Input.validateFileExists` function:
102+
Here is the definition of the built-in `Input.validateFileExists` function which was built with the existing `validate` function:
101103
```fsharp
102104
let validateFileExists (input: ActionInput<System.IO.FileInfo>) =
103105
input

0 commit comments

Comments
 (0)