| | |
| | | return null; |
| | | } |
| | | |
| | | public static decimal? ToDecimal(this string str) |
| | | { |
| | | if (str.IsNotNull() && decimal.TryParse(str, out var @int)) return @int; |
| | | return null; |
| | | } |
| | | |
| | | public static T? ToEnum<T>(this string str, string requiredMessage = null) |
| | | where T : struct |
| | | { |
| | |
| | | |
| | | public static bool CheckIsIdentityNumber18(this string identity) |
| | | { |
| | | return identity.IsNotNull() && identity.TryValidate(EnumValidationTypes.Identity).IsValid && identity.Length == 18; |
| | | return identity.IsNotNull() && identity.TryValidate(EnumValidationTypes.ValiIdentity).IsValid && identity.Length == 18; |
| | | } |
| | | |
| | | /// <summary> |