Validation fixes, finished application creation, added required char (*) for required fields
This commit is contained in:
		
							
								
								
									
										16
									
								
								SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Constants.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								SchengenVisaApi/BlazorWebAssemblyVisaApiClient/Constants.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| using System.Text.RegularExpressions; | ||||
| using Microsoft.AspNetCore.Components; | ||||
|  | ||||
| namespace BlazorWebAssemblyVisaApiClient | ||||
| { | ||||
|     public static class Constants | ||||
|     { | ||||
|         public readonly static Regex EnglishWordRegex = new("^[a-zA-Z]*$"); | ||||
|  | ||||
|         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}$"); | ||||
|  | ||||
|         public readonly static MarkupString RequiredFieldMarkup = (MarkupString)"<span style=\"color: red;\">*</span>"; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user