tests
This commit is contained in:
@@ -6,7 +6,7 @@ namespace ApplicationLayer
|
||||
{
|
||||
public readonly static Regex EnglishWordRegex = new("^[a-zA-Z]*$");
|
||||
|
||||
public readonly static Regex EnglishPhraseRegex = new(@"^[a-zA-Z№0-9?><;,{}[\]\-_+=!@#$%\^&*|']*$");
|
||||
public readonly static Regex EnglishPhraseRegex = new(@"^[a-zA-Z №0-9;,\-_+=#*']*$");
|
||||
|
||||
public readonly static Regex PhoneNumRegex = new(@"^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$");
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class PlaceOfWorkModelValidator : AbstractValidator<PlaceOfWorkModel>
|
||||
.WithMessage("Building of place of work can not be empty")
|
||||
.Matches(Constants.EnglishPhraseRegex)
|
||||
.WithMessage("Place of work building field can contain only english letters, digits and special symbols")
|
||||
.MaximumLength(ConfigurationConstraints.CountryNameLength)
|
||||
.MaximumLength(ConfigurationConstraints.BuildingNumberLength)
|
||||
.WithMessage($"Building of place of work length must be less than {ConfigurationConstraints.BuildingNumberLength}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user