Thank you for the wonderful video. I found it a bit difficult to understand the point about executing the login logic when the error is not empty. Intuitively, it felt like it should be the opposite.
@azamsharp7 күн бұрын
Basically if there are no errors then your UI is validated correctly and you can proceed with calling the API to validate the credentials.
@tube516k6 күн бұрын
@@azamsharp Thank you for the explanation! Your explanation aligns with my understanding. In that case, why does the following code shown in the video execute the login process when the error is not empty? if !errors.isEmpty { // perform the login request }
@azamsharp6 күн бұрын
@@tube516k Oh I see! I made the mistake. It should be errors.isEmpty. If errors are empty then perform the login process. Thanks for pointing it out.