Issues with RegularExpressionValidator in VB .NET 2005 using ASP File Uploader
- by JFV
I'm looking to validate a single word: detail (upper/lower/mix-case) prior to submitting my VB .NET 2005 page. I used Regex Builder and the below code validates, but it's not working in my web page... Does anyone have any ideas?
Input file location:
<input id="btnBrowseForFile" runat="server" enableviewstate="true" name="btnBrowseForFile"
style="width: 500px" type="file" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="btnBrowseForFile" ErrorMessage="*Please select an input file." Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="btnBrowseForFile"
Display="Dynamic" ErrorMessage='*Please select a file that contains the word "detail"'
ValidationExpression="(\b|\s|\w)(d|D)(e|E)(t|T)(a|A)(i|I)(l|L)(\s|\b|\w)"></asp:RegularExpressionValidator>
Thanks!!!
JFV