Skip to content

Commit 8dee559

Browse files
chore(deps): update dependency vapor/vapor to v4.111.0 (#1422)
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [vapor/vapor](https://redirect.github.com/vapor/vapor) | minor | `4.110.2` -> `4.111.0` | --- ### Release Notes <details> <summary>vapor/vapor (vapor/vapor)</summary> ### [`v4.111.0`](https://redirect.github.com/vapor/vapor/releases/tag/4.111.0): - Validation API | `Custom` Validator [Compare Source](https://redirect.github.com/vapor/vapor/compare/4.110.2...4.111.0) #### What's Changed Validation API | `Custom` Validator by [@&#8203;WilliamFernsV3](https://redirect.github.com/WilliamFernsV3) in [#&#8203;3263](https://redirect.github.com/vapor/vapor/issues/3263) > Resolves this issue I created the other day: [vapor/vapor#3261](https://redirect.github.com/vapor/vapor/issues/3261) > > **Problem**: > > The Validation API allows you to create custom validators. It works, and it is good enough. In some cases however, extending the Validation API is not needed, as the validation is only for one `Content` object, meaning it will only be used once. I also find it more complex to extend the Validation API. > > **Solution**: > > In some if not most cases where a user wants to add some custom validation, they can now use the `Custom` validator. It is simpler, and the implementation is shorter. > > ```swift > extension Validator where T == String { > public static var usPhoneNumber: Validator<T> { > .init { input -> ValidatorResult in > let stripped = input > .replacingOccurrences(of: "(", with: "") > .replacingOccurrences(of: ")", with: "") > .replacingOccurrences(of: "-", with: "") > .replacingOccurrences(of: " ", with: "") > … > ``` > > … #### Reviewers Thanks to the reviewers for their help: - [@&#8203;MrSuddenJoy](https://redirect.github.com/MrSuddenJoy) - [@&#8203;Naveen-C-Ramachandrappa](https://redirect.github.com/Naveen-C-Ramachandrappa) ###### *This patch was released by [@&#8203;0xTim](https://redirect.github.com/0xTim)* **Full Changelog**: vapor/vapor@4.110.2...4.111.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45NC4xIiwidXBkYXRlZEluVmVyIjoiMzguOTQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com>
1 parent 21450d7 commit 8dee559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/vapor_example/swift/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55
let package = Package(
66
name: "vapor_example",
77
dependencies: [
8-
.package(url: "https://github.com/vapor/vapor.git", exact: "4.110.2"),
8+
.package(url: "https://github.com/vapor/vapor.git", exact: "4.111.0"),
99
.package(url: "https://github.com/vapor/fluent.git", exact: "4.12.0"),
1010
.package(url: "https://github.com/vapor/fluent-sqlite-driver.git", exact: "4.8.0"),
1111
]

0 commit comments

Comments
 (0)