Slide 16
Slide 16 text
生成するSwiftコード
extension GeneratedGraphQLPackage.CreateRideInput {
func validate() -> CreateRideValidationError? {
guard (name.count >= 1 && name.count <= 64) else {
return .init(field: .name, message: ”...”)
}
guard try emailRegex.wholeMatch(in: email) != nil else {
return .init(field: .email, message: ”...”)
}
return nil
}
}