Skip to content

GUID Validation From UI

Prakash

Asked Mar 15, 2018, 12:43 AM EDT1 answer
Share
LinkedInX
Hello Experts,
 
i have below textbox i want to validate GUID.
In below Pattern is not working.
help me for validate guid from UI 
 
<form> 
<input type="text" class="form-control" id="txtid" name="txtid" pattern="[0-9A-Fa-f]{8}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{12}$" title="Enter valid Guid" required/> 
 
 
<Button> Go </Button> 
 </form>
 
Thanks 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Janak Sabhaya
    0
    @"^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$
    0