Vapor: 4.10.3 Release

Release date:
June 24, 2020
Previous version:
4.10.2 (released June 24, 2020)
Magnitude:
0 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 4.10.3

seeppp

Directory Browser for 4.10.3

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

This patch was authored by @seeppp and released by @MrLotU.

Validations now follows required argument while validating nested validations.

If we add a validation step of a nested object, which is optional, the required flag would be set false.

validations.add("optionalNestedObject", required: false, B.validations)

Therefore, we are now able to have an object like this: ```swift struct A: Codable { var name: String var optionalNestedObject: A? }

extension A: Validatable { static func validations(_ validations: inout Validations) { validations.add("name", as: String.self, is: .ascii) validations.add("optionalNestedObject", required: false, A.validations) } } `` The validator now validates the nested object only ifoptionalNestedObject != nil`.

If the nested object is non-optional, you can still omit the required argument. swift validations.add("nestedObject", B.validations)