Custom form email validation doesn't return an error
vilimas opened this issue · comments
Issue description
A customs form will not error if email validation fails.
Steps to reproduce the issue
For reproduce best to use an email with .xz ending.
feedback!.submitFeedback("Your message", email: "email@example.xz", completion: { (error, _unused) -> Void in
if (error?.localizedDescription != nil) {
print(error!.localizedDescription);
}
})
What's the expected result?
A. Message successfully send because I allow optional email
B. I get an error in the closure
What's the actual result?
My message was not delivered and closure is not called.
In log console I get only this message:
Response data: Invalid email address
Hey @vilimas, sorry for the delayed response here, I somehow didn't get an email for this!
The email being optional means you can leave it empty and the message will be sent, but if one is sent it will try and validate it! Sorry for the confusion.
As for the closure not being called, that definitely sounds like an issue, I'm looking into it now!
Thanks,
Phil
Hi @vilimas, I've just tagged version 0.2.7 which fixes the callback not always being called when there's an error!