Skip to content

Commit ec415f4

Browse files
Removed some validation checks due to incorrect regex.
1 parent 25832ab commit ec415f4

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

Model/Boardingv1registrationsOrganizationInformationBusinessInformation.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -942,18 +942,18 @@ public override int GetHashCode()
942942
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
943943
{
944944
// Name (string) pattern
945-
Regex regexName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
946-
if (false == regexName.Match(this.Name).Success)
947-
{
948-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, must match a pattern of " + regexName, new [] { "Name" });
949-
}
945+
//Regex regexName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
946+
//if (false == regexName.Match(this.Name).Success)
947+
//{
948+
// yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, must match a pattern of " + regexName, new [] { "Name" });
949+
//}
950950

951951
// DoingBusinessAs (string) pattern
952-
Regex regexDoingBusinessAs = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
953-
if (false == regexDoingBusinessAs.Match(this.DoingBusinessAs).Success)
954-
{
955-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoingBusinessAs, must match a pattern of " + regexDoingBusinessAs, new [] { "DoingBusinessAs" });
956-
}
952+
//Regex regexDoingBusinessAs = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
953+
//if (false == regexDoingBusinessAs.Match(this.DoingBusinessAs).Success)
954+
//{
955+
// yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoingBusinessAs, must match a pattern of " + regexDoingBusinessAs, new [] { "DoingBusinessAs" });
956+
//}
957957

958958
// Description (string) pattern
959959
Regex regexDescription = new Regex(@"[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&amp;!?%«»€₣«»€₣ ]{1,}$", RegexOptions.CultureInvariant);
@@ -963,11 +963,11 @@ public override int GetHashCode()
963963
}
964964

965965
// WebsiteUrl (string) pattern
966-
Regex regexWebsiteUrl = new Regex(@"\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))", RegexOptions.CultureInvariant);
967-
if (false == regexWebsiteUrl.Match(this.WebsiteUrl).Success)
968-
{
969-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for WebsiteUrl, must match a pattern of " + regexWebsiteUrl, new [] { "WebsiteUrl" });
970-
}
966+
//Regex regexWebsiteUrl = new Regex(@"\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))", RegexOptions.CultureInvariant);
967+
//if (false == regexWebsiteUrl.Match(this.WebsiteUrl).Success)
968+
//{
969+
// yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for WebsiteUrl, must match a pattern of " + regexWebsiteUrl, new [] { "WebsiteUrl" });
970+
//}
971971

972972
// TaxId (string) pattern
973973
Regex regexTaxId = new Regex(@"\\d{9}", RegexOptions.CultureInvariant);

Model/Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -223,25 +223,25 @@ public override int GetHashCode()
223223
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
224224
{
225225
// FirstName (string) pattern
226-
Regex regexFirstName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
227-
if (false == regexFirstName.Match(this.FirstName).Success)
228-
{
229-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, must match a pattern of " + regexFirstName, new [] { "FirstName" });
230-
}
226+
//Regex regexFirstName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
227+
//if (false == regexFirstName.Match(this.FirstName).Success)
228+
//{
229+
// yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, must match a pattern of " + regexFirstName, new [] { "FirstName" });
230+
//}
231231

232232
// MiddleName (string) pattern
233-
Regex regexMiddleName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
234-
if (false == regexMiddleName.Match(this.MiddleName).Success)
235-
{
236-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MiddleName, must match a pattern of " + regexMiddleName, new [] { "MiddleName" });
237-
}
233+
//Regex regexMiddleName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
234+
//if (false == regexMiddleName.Match(this.MiddleName).Success)
235+
//{
236+
// yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MiddleName, must match a pattern of " + regexMiddleName, new [] { "MiddleName" });
237+
//}
238238

239239
// LastName (string) pattern
240-
Regex regexLastName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
241-
if (false == regexLastName.Match(this.LastName).Success)
242-
{
243-
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, must match a pattern of " + regexLastName, new [] { "LastName" });
244-
}
240+
//Regex regexLastName = new Regex(@"^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$", RegexOptions.CultureInvariant);
241+
//if (false == regexLastName.Match(this.LastName).Success)
242+
//{
243+
// yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, must match a pattern of " + regexLastName, new [] { "LastName" });
244+
//}
245245

246246
// PhoneNumber (string) pattern
247247
Regex regexPhoneNumber = new Regex(@"^[0-9a-zA-Z\\\\+\\\\-]+$", RegexOptions.CultureInvariant);

0 commit comments

Comments
 (0)