Help in Regular Expression
-
Use RequiredFiledValidator along with this RegularExpression validator
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
Hey Navaneeth the problem here is we can't use asp validator for our application as after firing we are changing the style sheet of controls (in base control) by re rendering its content
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi All I need to develop one regular expression that is validating Name field in my application So Name can contain 0-9a-zA-Z. ,./()&'- this type of fields but the problem is if i put only blank spaces then it is returning true please help me it should not take bank place i can't put if else block as i have to give Expression to my validator eg "sandeep01 Akhare&(Peter's)" it ok but " " no should not take
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
http://www.codeproject.com/script/comments/forums.asp?msg=2300723&forumid=12076#xx2300723xx[^]
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hey Navaneeth the problem here is we can't use asp validator for our application as after firing we are changing the style sheet of controls (in base control) by re rendering its content
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
I guess this can't be done on a single regular expression. Are you allowed to use a custom JS function, Then you can make use of two expressions and validate it.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
I guess this can't be done on a single regular expression. Are you allowed to use a custom JS function, Then you can make use of two expressions and validate it.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
Ya that's what i was thinking but i am very poor in Regular expressions so thought lets post it in CP. No we are doing all validations aat server side only
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Ya that's what i was thinking but i am very poor in Regular expressions so thought lets post it in CP. No we are doing all validations aat server side only
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
playing with bugs ) wrote:
No we are doing all validations aat server side only
Use
Trim
function and check the length. This will trim white spaces in the both end. You can add whitespace trimming in regular expression too. But I think it will remove the spaces in between the words (Sandeep Akhare)playing with bugs ) wrote:
i am very poor in Regular expressions
It's very interesting. Download RegExBuddy. It's a ultimate tool, and it helped me a lot to learn regular expressions.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
Hi All I need to develop one regular expression that is validating Name field in my application So Name can contain 0-9a-zA-Z. ,./()&'- this type of fields but the problem is if i put only blank spaces then it is returning true please help me it should not take bank place i can't put if else block as i have to give Expression to my validator eg "sandeep01 Akhare&(Peter's)" it ok but " " no should not take
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
hey man u want to validate any particular alphabate or blank space or both alphabate and blank
Piyush Vardhan Singh
-
playing with bugs ) wrote:
No we are doing all validations aat server side only
Use
Trim
function and check the length. This will trim white spaces in the both end. You can add whitespace trimming in regular expression too. But I think it will remove the spaces in between the words (Sandeep Akhare)playing with bugs ) wrote:
i am very poor in Regular expressions
It's very interesting. Download RegExBuddy. It's a ultimate tool, and it helped me a lot to learn regular expressions.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
N a v a n e e t h wrote:
Download RegExBuddy
Thanks I will do that ...
N a v a n e e t h wrote:
Use Trim function and check the length
That's what i am doing finally // Check for blank spaces In both first and last Name fields if (String.IsNullOrEmpty(txtFirstName.Text.Trim())) { this.reqFirstName.IsValid = false; } reqFirstName is my validator derived from custom validator this line of code i am writing in my Pages not in validator then question will be why i have used this validator. i think its not proper implementation of validator Any way thanks for your suggestions and providing me RE tool
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
hey man u want to validate any particular alphabate or blank space or both alphabate and blank
Piyush Vardhan Singh
Piyush Vardhan Singh wrote:
both alphabate and blank
yes PVS it can have 0-9a-zA-Z. ,./()&'- these many alphabets but at same time it should not have just blank space i want regular expression for that
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Piyush Vardhan Singh wrote:
both alphabate and blank
yes PVS it can have 0-9a-zA-Z. ,./()&'- these many alphabets but at same time it should not have just blank space i want regular expression for that
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
^[\w\s,./?;'":`!~@#$%^&*()+=|{}[\]-]{1,500}$ use this for alpha bate,it handle many validation for alphabet in regular expression. first u put this in regular expression validate r and see what happen ofter that arrange this according to ur requirements. and for blank space use required validate r.
Piyush Vardhan Singh