Input Validation in Xamarin.Forms with Xamarin.CommunityToolkit

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ •

  • @emmanueladebiyi2109
    @emmanueladebiyi2109 3 роки тому +3

    Didn't know this existed in XCT. Awesome!

  • @glap915
    @glap915 3 роки тому +4

    Nice outro! I just learned RegEx on Friday, so I'm glad there are ways around coding that!

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

      Regex is so awesome and terrifying at the same time. But I’m glad we have some preconfigured ones 😄 let us know if you’re missing one!

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

      @@efexzium What's there to figure out?

  • @DileepKumar-vf5pk
    @DileepKumar-vf5pk 3 роки тому +1

    Really Awesome, Useful for almost every project. Able to see the hard work behind that. I'll plan to do this every time while starting a new project, but due to tight dead lines we just do copy pasting code.
    Now this helps a lot and more productive.

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

      The copy and pasting is exactly something we want to help with in the Xamarin Community Toolkit. There are so much of these little bits of code that you might copy from one project to the other because that is faster than creating your full library for it. That's why we create the library and you can use it!

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

    Will be using this in my next project! Yipee!

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

      Let me know how that goes!

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

    Thank you, I watch it to the end.

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

    You really read our minds.
    I was searching for that "Flags" ugh.
    I wanted to validate my text on the fly. So Yes I have to set the Flags to Validate on value changing. 😅
    Thank you :)

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

      Perfect! You were looking for functionality like this and now found out it was the flags? Cool! :D

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

      @@jfversluis yes!!

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

    Great job. Exactly what I need. But I would like to validate more than one field via code behind. is this possible with just one line of code like fields.IsValid.

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

      Not unless you create it with this I think... There is another validation plugin I want to make a video about that might have this... Stay tuned!

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

    I was wondering if there was an option (or plans to) add the concept of 'dirty' to these validation behaviors? Effectively, the validation Flags are ignored until the control has received and lost Focus at least once? Or is it already possible to approximate this behavior?

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

      Not that I know of... You might want to check the repo is there is an issue for that or else open one :)

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

      @@jfversluis Alright, thanks for the response.

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

    Hello, will these validation points block ``` ``` just curious ^^

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

      They definitely can with the IsValid property but you will have to hook it up yourself

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

    Hello friend, is the EntryLineValidationBehaviour property available?

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

      Not sure what you mean, sorry

  • @VIVEKKUMAR-mp2gu
    @VIVEKKUMAR-mp2gu 3 роки тому +1

    How can I make entry or text edit as required field

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

      Don’t let the user get passed the screen until the IsValid of that field is true :)

  • @AMIRKHAN-dm2fm
    @AMIRKHAN-dm2fm 3 роки тому +1

    Thank you so muchhhh.i really need this.

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

    Somehow Invalid Style not working for me, Entry stays the same even after invalid input.

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

      Have you set the behavior? Does it show up when you leave the input?

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

      @@jfversluis no nothing happens, tried with flags but same result. Behaviours are working I tried from code behind, by checking isValid, but invalid Style not applied.

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

    Please demonstrate with a click event so that we can fully understand the validations.

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

      I’m not sure if there is a click event to be honest. Seems like this is pretty much based for use with the MVVM pattern 😄

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

      @@jfversluis Just wanted to know how to set IsValid flag from XAML to check in viewmodel so that prevent further actions if invalid.

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

    I am trying to save image file which I got from the MediaPicker to the Android's storage. Same as this video. But I want to do this without using any external library. I tried searching but I can't seem to find a way to get the storage location of the android device.

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

      If whatever you try to do is possible with this library, go over to the repo and look at the source :)

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

      @@jfversluis I will try to do that. I mistakenly wrote the question in this video rather than "Pick Multiple Images and Videos with This Xamarin.Forms Library"

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

      @@BluerGost no worries! Just glad you’re watching multiple of my videos 😉

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

    Hi Gerald, after implementing the multivalidationbehavior i am getting the following errors: :XamlC error XFC0000: Cannot resolve type "MultiValidationBehavior".
    They work fine, and i can also compile and run my application, but i can't find a way to get rid of the errors. Got any idea what this could be?

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

      Unfortunately I do, it seems to be a tooling error. What you could try, if you really want to get rid of it is add the full namespace like xmlns:xct="Xamarin.CommunityToolkit.Behaviors.MultiValidationBehavior". I think that resolves is

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

    Side question if I may :) Do you have experience with DisplayPromptAsync? I am trying to use it on a TabbedPage when I click a button and that handler never shows the prompt window for me to try text. #confused.

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

      Looks like you don't want to be using that anymore: docs.microsoft.com/dotnet/api/xamarin.forms.page.displaypromptasync?view=xamarin-forms

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

      @@jfversluis Not quite. That message concerns the overload. There were two functions. The latest allows you to provide the initial text. The former function is the one that has been deprecated.
      Turns out that sadly DisplayPromptAsync is not currently supported on the MacOS.

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

      Ah I’ve looked too fast. Yeah I remember doing some work on that. Not sure what’s needed to make it work on macOS

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

      @@jfversluis It would save me having to create a new XAML window just for the same ability to ask for a new name or edit and existing name. It would keep consistency between iOS and macOS and would make my code easier to maintain. I also raised the issue here: developercommunity2.visualstudio.com/t/DisplayPromptAsync-is-not-displaying-on/1338315.

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

      The problem is macOS was not really supported to begin with so I wouldn’t count on anything changing anytime soon :) I think the plans are to do better when .NET MAUI comes along

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

    thank you this is very useful

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

      Are you planning on using it anytime soon?

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

    Is there any tooltip support in xamarin community toolkit?

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

      There is not! To be honest I find tooltips not great for mobile. How do you want to use it?

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

    I would live to test the samples from Xamarin Community! But I downloaded it from GitHub and was not able to compile it.

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

      Sorry to hear that Cezar, instead of compiling it, could you try to set the Android or iOS project as the startup project and just run it? Does that work?
      I'd love to hear the details. Please find my email address on github.com/jfversluis and reach out :)

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

    Thank you Jerald
    Can you make a video about uploading and downloading files to firebase in xamarin forms !

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

      I don’t have much experience with Firebase so not sure if I will get to it soon, but I’ll see :) thanks!

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

    My superman❤️

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

      Should I be wearing a cape in my videos? 🤔

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

      @@jfversluis No, the S t-Shirt😅

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

    Thank You!

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

      I should be thanking you! Thank you for watching!

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

      And thank you for becoming a member! Very much appreciate it!

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

    Thank you thank you.

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

    👍

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

    LOL - I did watch the outro