Combine Form Validation SwiftUI

Поділитися
Вставка
  • Опубліковано 8 лют 2025

КОМЕНТАРІ • 45

  • @ameyajoshi5673
    @ameyajoshi5673 Рік тому

    Great tutorial. Coming from Android Development, SwiftUI has been a huge learning curve for me.

  • @nitesh-maharaj
    @nitesh-maharaj 3 роки тому

    Such a brilliant video Stewart. Recently discovered your channel and it's such a gem. Your teaching style is brilliant. Keep up the awesome work and thank you!

  • @taslimfi
    @taslimfi 3 роки тому

    Very clear explanation. Love this brilliant channel so much.

  • @Mahadev-x7u
    @Mahadev-x7u 3 роки тому +1

    Awesome like always Stewart... thank you very much 🙏

  • @quyenanhnguyen9046
    @quyenanhnguyen9046 3 роки тому

    Thanks alot, Stewart!. It's very helpful.

  • @EmanNollase
    @EmanNollase 2 роки тому +1

    This is awesome! Question though, how to validate the fields only when the button is press and add red border to the field not passed the validation? Thanks

  • @cruiseqe2
    @cruiseqe2 3 роки тому

    Yet another awesome video tutorial.

  • @SBSanook
    @SBSanook 3 роки тому +1

    This is really very nice, thanks Stewart! Very useful and looks good, too! I had gone thru tundsdev's video before and frankly got lost, but yours was quite clear and understandable. Any reason you did the custom view for the birth year rather than use a picker?

    • @StewartLynch
      @StewartLynch  3 роки тому +2

      I just liked doing it this way. I am sure the date picker would work too.

  • @mhfs61
    @mhfs61 3 роки тому

    Great tutorial, Stewart.

  • @fredrigaudeau
    @fredrigaudeau 3 роки тому +1

    Great content., thanks! Is there any advantages to use Combine vs the first video you did? The first method seems more easier to approach for a beginner (Combine is a bit hard to learn).

    • @StewartLynch
      @StewartLynch  3 роки тому

      I would say it is your choice. I just wanted to cover Combine.

    • @fredrigaudeau
      @fredrigaudeau 3 роки тому

      @@StewartLynch Thank you, btw I think mastering Combine is a no-brainer, so this is an opportunity to dive in.

  • @EmanNollase
    @EmanNollase 2 роки тому

    Hi, is there a way to have a common emptyPublisher and reuse it for other fields that need to validate into empty?

  • @30guarino
    @30guarino 3 роки тому

    Hey nice video....was a little confused why you didn't use '.sink' but used '.assign' when using combine in your View Model?

    • @StewartLynch
      @StewartLynch  3 роки тому

      You have options so I chose assign

  • @scottbennett8496
    @scottbennett8496 3 роки тому

    Great Tutorial, I really enjoy your presentations!
    For this one I also added .disableAutoCorrection(true) to the EntryField so it wouldn't try to always fix the email.

  • @Prashant-7
    @Prashant-7 3 роки тому

    Good stuff 🤗

  • @antonreashin
    @antonreashin 7 місяців тому

    Благодарю 🙏

  • @spaceshipable
    @spaceshipable 3 роки тому +1

    You can use triple quotes to handle escaping for you.

    • @StewartLynch
      @StewartLynch  3 роки тому

      Thanks. Good to know

    • @spaceshipable
      @spaceshipable 3 роки тому

      @@StewartLynch You can also use string literals that are surrounded in # symbols if that's easier too. Triple quotes are really for multi-line strings but happen to handle escaping quotes too.

    • @StewartLynch
      @StewartLynch  3 роки тому +1

      Right. I completely forgot about that. Thanks for that tip

  • @GemoGem
    @GemoGem 3 роки тому

    Why you don' t set the regex string between ##?

    • @StewartLynch
      @StewartLynch  3 роки тому +1

      Yes, I forgot about that option.

    • @GemoGem
      @GemoGem 3 роки тому

      @@StewartLynch You are welcome 😃

  • @ortezan4186
    @ortezan4186 2 роки тому

    I have a minor bug: when prompt disappear white space between textfields collapses. Any ideas how to fix this?

    • @StewartLynch
      @StewartLynch  2 роки тому

      Are you seeing that on my completed project too?

    • @ortezan4186
      @ortezan4186 2 роки тому

      @@StewartLynch Yep, unlike on you youtube video. I am now on xcode 14 and iOS 15.5 simulator

    • @StewartLynch
      @StewartLynch  2 роки тому

      I haven’t used combine for a while now so I am not sure. Sounds like something has changed. I will have to take a look at that project to see. If I find out anything I will post a reply here.

    • @StewartLynch
      @StewartLynch  2 роки тому

      I just ran my completed app with iOS 16 and I found no issues. I still have padding between the TextFields when the prompt disappears.

  • @Architect_Mobile
    @Architect_Mobile 3 роки тому

    Круто 👍🏻

  • @muhammedsafaroff
    @muhammedsafaroff 2 роки тому

    MVVM for SwiftUI is so wrong

    • @StewartLynch
      @StewartLynch  2 роки тому

      You are entitled to your opinion. Whatever works for you.