Home > Regular Expression > Regular Expression Validator Not Working In Firefox

Regular Expression Validator Not Working In Firefox

Close On the go? The Art of Word Shaping What's the easiest way to remove chewing gum from a medium-pile floor mat? That said, you should really be backing up any client side validation with a Page.IsValid check anyhow. Permalink Posted 10-Mar-11 1:07am Ramalinga Koushik20 Comments Dalek Dave 10-Mar-11 7:29am A well known problem, good link though. http://pagesetter.net/regular-expression/regular-expression-validator-not-working-in-asp-net.html

It is working fine with IE, but not able to work with firefox. Server-side validation on postback should nevertheless work independent of the browser and any client-side script ASP.NET might or might not generate. How much would you like to contribute? It is either the HTML that is in your ItemTemplate tag, the javascript itself, or the difference between IE and Firefox.

But for some reason it does not work when I use Firefox. Does this mean none of my Validators are working for these Browsers? You can now find them here. Thanks Reply dead_zone200...

Close Save Try Complete Themes Collections Featured Most Followers Newest Collections I've Made Collections I'm Following My Favorite Add-ons More… Add-ons for Mobile Dictionaries & Language Packs Search Tools Developer Hub To try if you change it to this: `.(pdf|txt|doc|csv|xls|xlsx)$' it only ensures the names ends with an approved extension (this just a slight improvement on what @waqas posted) Simon share|improve this answer answered Validators not working on Mozilla P: n/a tshad I have a RegularExpressionValidator that is testing a field to make sure the number is between 0 and 255.

Still it's a question why it's not working in Firefox. When answering a question please: Read the question carefully. Close Welcome to Firefox Add-ons. Not the answer you're looking for?

ASP.NET 4 supports more predictive name generation, or you could use CSS classes. Use javascript to do the validation instead of regular expression validator. I included \ x22 take care of doulbe quotes also. ^(a-z|A-Z|0-9)*[^\]$%^&*~!?:/|\[\'\\\\\x22]*$ Thanks, Spunny Marked as answer by Spunny Tuesday, February 15, 2011 7:47 PM Tuesday, February 15, 2011 7:46 PM Thanks, Tom > -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ Aug 25 '06 #5 This discussion thread is closed Start new discussion Replies have been disabled for this discussion.

I've implemented both of your suggestions and things now work fine in both browsers. The form tag must be in the section of the page. Register FAQ/Rules My SitePoint Forum Actions Mark Forums Read Quick Links View Forum Leaders Remember Me? Once again, many thanks!

Optional Password I have read and agree to the Terms of Service and Privacy Policy Please subscribe me to the CodeProject newsletters Submit your solution! http://pagesetter.net/regular-expression/regular-expression-validator-not-firing.html Reply A1ien51 All-Star 15177 Points 5769 Posts Re: Regular Expression to validate FileUpload Control not working in Firefox 3.0 Nov 02, 2008 08:31 AM|A1ien51|LINK If you look at the value of About 55 results The regular expression is too restrictive. Is there a standard DNS record to indicate the IMAP server for a domain?

First, validate the output-ed HTML with an HTML validator. I included \ x22 take care of doulbe quotes also. ^(a-z|A-Z|0-9)*[^\]$%^&*~!?:/|\[\'\\\\\x22]*$ Thanks, Spunny Marked as answer by Spunny Tuesday, February 15, 2011 7:47 PM Tuesday, February 15, 2011 7:46 PM The SitePoint Forums have moved. http://pagesetter.net/regular-expression/asp-regular-expression-validator-not-firing.html Quick Navigation .NET Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Community Center News & Announcements General Discussions Introductions Talk With The Experts Website Design

As I tab out of the field, the error is caught and message displayed. Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI Thanks, Spunny Tuesday, February 15, 2011 3:39 PM Answers 0 Sign in to vote I got it working in IE and FireFox.

If your reg exp taking that into account?

function showImage(){ // Get thumbnail path. But not in the other browsers. Thanks, Tom Aug 25 '06 #1 Post Reply Share this Question 4 Replies P: n/a Teemu Keiski Using ASP.NET 1 or 2? explaining what's wrong with firefox. –myforums Feb 18 '10 at 16:43 add a comment| 5 Answers 5 active oldest votes up vote 14 down vote Try this: (.*?)\.(jpg|jpeg|png|gif)$ share|improve this answer

Recalll is crowed sourced knowledge vault, where community can create, curate and access qualitative knowledge, In form of small and precise topics. share|improve this answer answered May 1 '09 at 8:14 Etienne 2,4922882131 That is a completely different regex than what your question's regex was validating. Browse other questions tagged c# asp.net vb.net validation file-upload or ask your own question. this contact form Server-side validation on postback should nevertheless work independent of the browser and any client-side script ASP.NET might or might not generate. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ Aug 25 '06

Does this series involving sine converge or diverge? SitePoint Sponsor User Tag List Results 1 to 4 of 4 Thread: ASP.NET Regular Expression Validator not working when viewing site through Firefox. Did the Gang of Four really thoroughly explore "Pattern Space"? Visit our UserVoice Page to submit and vote on ideas!

Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jul 16, 2005,09:24 #1 eggfriedrice View Profile View Forum Posts SitePoint You’ll be auto redirected in 1 second. Member 1 Points 9 Posts Re: Regular Expression to validate FileUpload Control not working in Firefox 3.0 Mar 01, 2009 09:23 AM|dead_zone2006|LINK how can i modify this expression to allow only backreferences), smart bracket interpretation, testing while writing optionally in Java or JavaScript, context-sensual help for special characters, saving and managing of expressions and adjusting the display of the result.

Send Report

get to know add-ons About Blog Developer Hub FAQ Forum Other languages Afrikaans عربي Български বাংলা (বাংলাদেশ) Català Čeština Dansk Deutsch Dolnoserbšćina Ελληνικά English (British) English (US) Español You may have to register before you can post: click the register link above to proceed. Your Email Password Forgot your password?