ModelValidatorsExtensionsIsStringValid Method

Checks Whether a string field is properly filled in. (texts with digits/without digits only, no special characters!)

Definition

Namespace: MobileTrack.Common.Extensions
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public static bool IsStringValid(
	string? item,
	string propertyName,
	int? minLength,
	bool allowDigits,
	bool allowSpecialCharacters,
	StatusCode notFilledInStatusCode,
	out ValidationModel validationModel
)

Parameters

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

Return Value

Boolean
if all fields have been properly filled in.

See Also