C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

validation expressions for date, characters,


Posted Date: 06 Nov 2009      Posted By: prem kumar      Member Level: Bronze     Points: 1   Responses: 3



send us the validation expressions for date, characters,numeric,alphanumeric








Responses

Author: dom    06 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

function decimalfinancial(evt)
{
if (!(evt.keyCode == 46 || (evt.keyCode >= 48 && evt.keyCode <= 57)))
{
alert('Please enter only Numbers or decimal.');
return false;
}
var parts = evt.srcElement.value.split('.');
if (parts.length >3)
return false;
if (evt.keyCode == 46)
return (parts.length == 1);
if (parts[0].length >= 14)
return false;
if (parts.length ==3 && parts[1].length >=3)
return false;
}


this script us efor number and numeric...
rate this respons if u satisfy



Author: Deepika Haridas    06 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hello,

You can check resources section for this.



Thanks & Regards,
Deepika
Editor

If U want to shine like a SUN..First U have to burn like the SUN!!
Need a Guide? Join my mentor program..



Author: Kirtan    08 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

For Date

Indian Format ( dd/mm/yyyy)

RegEx is

(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)[0-9]{2}


For Numberic

[0-9]*

and Alpha Numeric

[0-9A-Za-z]*

Kirtan Patel
-----------------------------------------------------
Master Of Computer Application(Sem-1)
Bachelore of Computer Application



Post Reply
You must Sign In to post a response.
Next : Serialization importance
Previous : Req code for Max value of table
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use