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.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
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