ModelValidatorsExtensionsIsStringValid Method
Checks Whether a string field is properly filled in. (texts with digits/without digits only, no special characters!)
Namespace: MobileTrack.Common.ExtensionsAssembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
public static bool IsStringValid(
string? item,
string propertyName,
int? minLength,
bool allowDigits,
bool allowSpecialCharacters,
StatusCode notFilledInStatusCode,
out ValidationModel validationModel
)
- item String
- string item to check
- propertyName String
- name of the property
- minLength NullableInt32
- Minimum length of the string (if set)
- allowDigits Boolean
- Whether to allow digits
- allowSpecialCharacters Boolean
- Whether to allow special characters
- notFilledInStatusCode StatusCode
- Status code to be applied when the item isn't filled in
- validationModel ValidationModel
- The validation model containing the result of the check
Boolean if all fields have been properly filled in.