Czlovek.Validators
1.0.10
See the version list below for details.
dotnet add package Czlovek.Validators --version 1.0.10
NuGet\Install-Package Czlovek.Validators -Version 1.0.10
<PackageReference Include="Czlovek.Validators" Version="1.0.10" />
<PackageVersion Include="Czlovek.Validators" Version="1.0.10" />
<PackageReference Include="Czlovek.Validators" />
paket add Czlovek.Validators --version 1.0.10
#r "nuget: Czlovek.Validators, 1.0.10"
#:package Czlovek.Validators@1.0.10
#addin nuget:?package=Czlovek.Validators&version=1.0.10
#tool nuget:?package=Czlovek.Validators&version=1.0.10
Validators
Overview
This code provides extension methods for the string
data type to validate whether a given string is a valid email address or phone number. The validation is performed using regular expressions.
Usage
To use these extension methods in your code, you can include the Extensions
class in your project and call the IsEmail
or IsPhone
method on a string object. Here are some examples:
string email = "example@example.com";
bool isValidEmail = email.IsEmail(); // true
string phone = "+420 123 456 789";
bool isValidPhone = phone.IsPhone(); // true
Methods
IsEmail(string value)
This method takes a string parameter value
and returns a boolean value indicating whether the string is a valid email address. The regular expression used for validation matches the majority of email addresses according to the RFC 5322 specification.
Example usage:
string email = "example@example.com";
bool isValidEmail = email.IsEmail(); // true
IsPhone(string value)
This method takes a string parameter value
and returns a boolean value indicating whether the string is a valid phone number. The regular expression used for validation matches any string that contains digits and whitespace characters, optionally preceded by a plus sign (+
) and a country code.
Example usage:
string phone = "+420 123 456 789";
bool isValidPhone = phone.IsPhone(); // true
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- Czlovek.Strings (>= 1.0.10)
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 |
---|---|---|
2.1.0-beta.59 | 135 | 8/13/2025 |
2.1.0-beta.58 | 118 | 8/13/2025 |
2.1.0-beta.57 | 120 | 8/13/2025 |
2.1.0-beta.56 | 119 | 8/12/2025 |
2.1.0-beta.55 | 118 | 8/12/2025 |
2.1.0-beta.54 | 117 | 8/10/2025 |
2.1.0-beta.53 | 117 | 8/10/2025 |
2.1.0-beta.52 | 121 | 8/10/2025 |
2.1.0-beta.51 | 89 | 8/9/2025 |
2.1.0-beta.50 | 89 | 8/9/2025 |
2.1.0-beta.49 | 87 | 8/9/2025 |
2.1.0-beta.48 | 90 | 8/9/2025 |
2.1.0-beta.47 | 92 | 8/9/2025 |
2.1.0-beta.46 | 136 | 7/29/2025 |
2.1.0-beta.45 | 93 | 7/29/2025 |
2.1.0-beta.44 | 95 | 7/29/2025 |
2.1.0-beta.43 | 113 | 7/5/2025 |
2.1.0-beta.42 | 124 | 6/23/2025 |
2.1.0-beta.41 | 81 | 6/6/2025 |
2.1.0-beta.40 | 67 | 6/6/2025 |
2.1.0-beta.38 | 151 | 6/3/2025 |
2.1.0-beta.37 | 129 | 5/27/2025 |
2.1.0-beta.36 | 69 | 5/10/2025 |
2.1.0-beta.35 | 56 | 5/10/2025 |
2.1.0-beta.34 | 50 | 5/10/2025 |
2.1.0-beta.33 | 205 | 4/10/2025 |
2.1.0-beta.32 | 138 | 4/9/2025 |
2.1.0-beta.31 | 143 | 4/9/2025 |
2.1.0-beta.30 | 137 | 4/9/2025 |
2.1.0-beta.29 | 134 | 4/9/2025 |
2.1.0-beta.28 | 177 | 3/11/2025 |
2.1.0-beta.27 | 159 | 3/9/2025 |
2.1.0-beta.26 | 110 | 3/8/2025 |
2.1.0-beta.25 | 112 | 3/8/2025 |
2.1.0-beta.24 | 199 | 3/6/2025 |
2.1.0-beta.23 | 180 | 3/4/2025 |
2.1.0-beta.22 | 181 | 3/4/2025 |
2.1.0-beta.21 | 102 | 2/23/2025 |
2.1.0-beta.20 | 70 | 2/22/2025 |
2.1.0-beta.19 | 71 | 2/22/2025 |
2.1.0-beta.18 | 69 | 2/22/2025 |
2.1.0-beta.17 | 71 | 2/22/2025 |
2.1.0-beta.16 | 76 | 2/22/2025 |
2.1.0-beta.15 | 65 | 2/22/2025 |
2.1.0-beta.14 | 68 | 2/22/2025 |
2.1.0-beta.13 | 71 | 2/22/2025 |
2.1.0-beta.12 | 83 | 2/22/2025 |
2.1.0-beta.11 | 91 | 2/21/2025 |
2.1.0-beta.10 | 85 | 2/20/2025 |
2.1.0-beta.9 | 73 | 1/20/2025 |
2.1.0-beta.8 | 90 | 1/20/2025 |
2.1.0-beta.7 | 67 | 1/20/2025 |
2.1.0-beta.6 | 68 | 1/20/2025 |
2.1.0-beta.5 | 77 | 1/19/2025 |
2.1.0-beta.4 | 64 | 1/19/2025 |
2.1.0-beta.3 | 72 | 1/19/2025 |
2.1.0-beta.2 | 62 | 1/19/2025 |
2.1.0-beta.1 | 62 | 1/19/2025 |
2.0.0-beta.8 | 175 | 8/25/2024 |
2.0.0-beta.7 | 151 | 6/11/2024 |
2.0.0-beta.5 | 72 | 6/11/2024 |
2.0.0-beta.4 | 86 | 6/10/2024 |
2.0.0-beta.3 | 81 | 5/19/2024 |
2.0.0-beta.2 | 764 | 2/7/2024 |
2.0.0-beta.1 | 96 | 1/18/2024 |
1.0.11-beta.40 | 159 | 12/17/2023 |
1.0.11-beta.39 | 117 | 12/10/2023 |
1.0.11-beta.38 | 116 | 11/26/2023 |
1.0.11-beta.37 | 89 | 11/26/2023 |
1.0.11-beta.36 | 88 | 11/25/2023 |
1.0.11-beta.35 | 89 | 11/25/2023 |
1.0.11-beta.34 | 90 | 11/25/2023 |
1.0.11-beta.33 | 92 | 11/25/2023 |
1.0.11-beta.32 | 96 | 11/25/2023 |
1.0.11-beta.31 | 92 | 11/23/2023 |
1.0.11-beta.30 | 94 | 11/18/2023 |
1.0.11-beta.29 | 88 | 11/17/2023 |
1.0.11-beta.28 | 83 | 11/17/2023 |
1.0.11-beta.27 | 73 | 11/16/2023 |
1.0.11-beta.26 | 79 | 11/16/2023 |
1.0.11-beta.25 | 84 | 11/16/2023 |
1.0.11-beta.24 | 102 | 11/1/2023 |
1.0.11-beta.23 | 89 | 10/31/2023 |
1.0.11-beta.22 | 141 | 9/11/2023 |
1.0.11-beta.21 | 113 | 9/10/2023 |
1.0.11-beta.20 | 172 | 8/26/2023 |
1.0.11-beta.19 | 117 | 8/18/2023 |
1.0.11-beta.18 | 108 | 8/17/2023 |
1.0.11-beta.17 | 113 | 8/17/2023 |
1.0.11-beta.16 | 111 | 8/17/2023 |
1.0.11-beta.15 | 105 | 8/17/2023 |
1.0.11-beta.14 | 120 | 8/15/2023 |
1.0.11-beta.13 | 123 | 8/11/2023 |
1.0.11-beta.12 | 115 | 8/11/2023 |
1.0.11-beta.11 | 125 | 8/3/2023 |
1.0.11-beta.10 | 131 | 8/1/2023 |
1.0.11-beta.9 | 130 | 7/11/2023 |
1.0.11-beta.8 | 120 | 7/11/2023 |
1.0.11-beta.7 | 120 | 7/11/2023 |
1.0.11-beta.6 | 128 | 5/16/2023 |
1.0.11-beta.5 | 124 | 5/16/2023 |
1.0.11-beta.4 | 122 | 5/16/2023 |
1.0.11-beta.3 | 123 | 5/16/2023 |
1.0.11-beta.2 | 118 | 5/16/2023 |
1.0.11-beta.1 | 126 | 5/14/2023 |
1.0.10 | 294 | 4/11/2023 |
1.0.10-beta.2 | 139 | 4/11/2023 |
1.0.10-beta.1 | 146 | 3/22/2023 |
1.0.9 | 293 | 3/22/2023 |
1.0.8 | 312 | 3/19/2023 |
1.0.7 | 315 | 3/19/2023 |
1.0.6 | 289 | 3/16/2023 |
1.0.6-beta.1 | 130 | 3/16/2023 |
1.0.5 | 305 | 3/16/2023 |
1.0.4 | 294 | 3/12/2023 |