AzDevTeam.PasswordValidator 1.0.1

dotnet add package AzDevTeam.PasswordValidator --version 1.0.1
NuGet\Install-Package AzDevTeam.PasswordValidator -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AzDevTeam.PasswordValidator" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AzDevTeam.PasswordValidator --version 1.0.1
#r "nuget: AzDevTeam.PasswordValidator, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AzDevTeam.PasswordValidator as a Cake Addin
#addin nuget:?package=AzDevTeam.PasswordValidator&version=1.0.1

// Install AzDevTeam.PasswordValidator as a Cake Tool
#tool nuget:?package=AzDevTeam.PasswordValidator&version=1.0.1

Password Validation Library

This program provides functionality to validate a password based on various conditions like length, containing uppercase and lowercase letters, numbers, symbols, etc. The program is written in C# and uses Regular Expressions to match patterns.

How to use

  1. Include the PasswordValidator namespace.
  2. Create an instance of the PasswordValidation class.
  3. Call the ValidatePassword() method, passing the password and confirm password strings as arguments.
  4. The method returns an instance of the PasswordValidationResult class that indicates whether the password is valid or not.
  5. You can also pass an instance of the PasswordValidationConfiguration class to customize the validation conditions.

Methods

ValidatePassword(string password, string confirmPassword)

This method validates the password and confirm password strings and returns a PasswordValidationResult instance.

ValidatePassword(string password, string confirmPassword, PasswordValidationConfiguration configuration)

This method validates the password and confirm password strings and returns a PasswordValidationResult instance based on the specified PasswordValidationConfiguration conditions.

PasswordValidationResult

This class represents the result of password validation.

Properties

IsValid
This property gets a value indicating whether the password is valid or not.

FailureMessages
This property gets a list of failure messages if the password is not valid.

PasswordValidationConfiguration

This class represents the configuration options for password validation.

Properties

ContainWhiteSpace

This property indicates whether the password should contain white space or not.

ContainUpperCase

This property indicates whether the password should contain uppercase letters or not.

ContainLowerCase

This property indicates whether the password should contain lowercase letters or not.

ContainNumber

This property indicates whether the password should contain numbers or not.

ContainSymbol

This property indicates whether the password should contain symbols or not.

MinimumLength

This property indicates the minimum length of the password.

FailureMessages

This property contains a list of failure messages for each validation condition.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 166 3/12/2023
1.0.0 142 3/12/2023

General Password Validator With Configurations