< Summary - ZhEaIsNsAaBn.Libraries coverage (affected: 23 packages)

Information
Class: FluentValidation.FluentValidationStringHelpers
Assembly: ZhEaIsNsAaBn.Utilities.FluentValidation
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/UtilitiesPackages/ZhEaIsNsAaBn.Utilities.FluentValidation/FluentValidationStringHelpers.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 44
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsArabicCharsAndSpecialCharactersOnly(...)100%11100%
IsArabicCharsOnly(...)100%11100%
IsEnglishCharsNumbersAndSpecialCharactersOnly(...)100%11100%
IsEnglishCharsNumbersOnly(...)100%11100%
IsEnglishCharsOnly(...)100%11100%
IsValidHexColor(...)100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/UtilitiesPackages/ZhEaIsNsAaBn.Utilities.FluentValidation/FluentValidationStringHelpers.cs

#LineLine coverage
 1// ReSharper disable once CheckNamespace
 2namespace FluentValidation;
 3
 4/// <summary>Rules on which characters a text may contain.</summary>
 5public static class FluentValidationStringHelpers
 6{
 7    /// <summary>Arabic letters, digits, space and <c>| / &amp; - _</c> only.</summary>
 8    /// <typeparam name="T">The validated type.</typeparam>
 9    /// <param name="ruleBuilder">The rule builder.</param>
 10    /// <returns>The rule builder options.</returns>
 11    public static IRuleBuilderOptions<T, string> IsArabicCharsAndSpecialCharactersOnly< T >( this IRuleBuilder<T, string
 1812        => ruleBuilder.Matches( @"^[\u0600-\u06FF0-9|/&\-_ ]+$" ).WithErrorCode( nameof( IsArabicCharsAndSpecialCharacte
 13
 14    /// <summary>Arabic letters, digits and space only.</summary>
 15    /// <typeparam name="T">The validated type.</typeparam>
 16    /// <param name="ruleBuilder">The rule builder.</param>
 17    /// <returns>The rule builder options.</returns>
 918    public static IRuleBuilderOptions<T, string> IsArabicCharsOnly< T >( this IRuleBuilder<T, string> ruleBuilder ) => r
 19
 20    /// <summary>English letters, digits, space and <c>| / ' &amp; - _</c> only.</summary>
 21    /// <typeparam name="T">The validated type.</typeparam>
 22    /// <param name="ruleBuilder">The rule builder.</param>
 23    /// <returns>The rule builder options.</returns>
 24    public static IRuleBuilderOptions<T, string> IsEnglishCharsNumbersAndSpecialCharactersOnly< T >( this IRuleBuilder<T
 1525        => ruleBuilder.Matches( @"^[0-9|/'&\-_ a-zA-Z]+$" ).WithErrorCode( nameof( IsEnglishCharsNumbersAndSpecialCharac
 26
 27    /// <summary>English letters, digits and space only.</summary>
 28    /// <typeparam name="T">The validated type.</typeparam>
 29    /// <param name="ruleBuilder">The rule builder.</param>
 30    /// <returns>The rule builder options.</returns>
 331    public static IRuleBuilderOptions<T, string> IsEnglishCharsNumbersOnly< T >( this IRuleBuilder<T, string> ruleBuilde
 32
 33    /// <summary>English letters, space, <c>-</c> and <c>'</c> only (empty allowed).</summary>
 34    /// <typeparam name="T">The validated type.</typeparam>
 35    /// <param name="ruleBuilder">The rule builder.</param>
 36    /// <returns>The rule builder options.</returns>
 337    public static IRuleBuilderOptions<T, string> IsEnglishCharsOnly< T >( this IRuleBuilder<T, string> ruleBuilder ) => 
 38
 39    /// <summary>A hex colour: <c>#RGB</c>, <c>#RRGGBB</c> or <c>#RRGGBBAA</c> (<c>#</c> optional).</summary>
 40    /// <typeparam name="T">The validated type.</typeparam>
 41    /// <param name="ruleBuilder">The rule builder.</param>
 42    /// <returns>The rule builder options.</returns>
 1243    public static IRuleBuilderOptions<T, string> IsValidHexColor< T >( this IRuleBuilder<T, string> ruleBuilder ) => rul
 44}