Giter Site home page Giter Site logo

bertuzzi.maui.behaviorvalidationpack's Introduction

Bertuzzi.MAUI.BehaviorValidationPack

Package with multiple field validations for MAUI.

Easily validate numbers, texts and implement masks.

This is the component, works on iOS, Android and UWP.

NuGet

Name Info
Bertuzzi.MAUI.BehaviorValidationPack NuGet

Platform Support

Bertuzzi.MAUI.BehaviorValidationPack is a MAUI library.

Setup / Usage

Does not require additional configuration. Just install the package in the shared project and use.

You just need to add the reference in your xaml file.

    xmlns:behaviorPack="clr-namespace:Bertuzzi.MAUI.BehaviorValidationPack;assembly=XBertuzzi.MAUI.BehaviorValidationPack"

Behavior

        <Label Text="Date" FontSize="Small" />
        <DatePicker >
            <DatePicker.Behaviors>
                <behaviorPack:DateValidationBehavior/>
                <behaviorPack:MaskedBehavior Mask="XX/XX/XXXX" />
            </DatePicker.Behaviors>
        </DatePicker>
        
         <Label Text="Age" FontSize="Small" />
        <Entry Placeholder="Age" FontSize="Small">
            <Entry.Behaviors>
                <behaviorPack:MaxLengthValidationBehavior  MaxLength="2"/>
                <behaviorPack:NumberValidationBehavior/>
            </Entry.Behaviors>
        </Entry>

Available Behaviors

Global Validators

  • DateValidationBehavior : Checks if an Date is valid.
  • EmailValidationBehavior : Checks if an email is valid.
  • MaxLengthValidationBehavior : Limits a Entry with a maximum number of characters.
  • NumberValidationBehavior : Valid if a Entry is numeric.
  • PasswordValidationBehavior : Validate the strength of a password: at least 8 characters at least 1 numeric character at least 1 lowercase letter at least 1 uppercase letter at least 1 special character

Brazilians Validators

  • CEPValidationBehavior : Checks if an CEP is valid.
  • CNPJValidationBehavior : Checks if an CNPJ is valid.
  • CPFValidationBehavior : Checks if an CPF is valid.
  • CPFCNPJValidationBehavior : Checks if an CPF or CNPJ is valid.

Masks

  • MaskedBehavior : Creates a custom mask on an entry.
   <behaviorPack:MaskedBehavior Mask="XX/XX/XXXX" />

The complete example can be downloaded here: https://github.com/TBertuzzi/Xamarin.Forms.BehaviorValidationPack/tree/master/MAUIBehaviorValidationPackSample

based on my package : https://github.com/TBertuzzi/Xamarin.Forms.BehaviorValidationPack

bertuzzi.maui.behaviorvalidationpack's People

Contributors

tbertuzzi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.