Ask a Question related to ASP.NET General, Design and Development.
-
Emil Kvarnhammar #1
Re: Length validation?
Hi, Wim!
Easier to use for a developer. True.
But not that advanced validation, for instance if you want to use the
Validator controls functionality
for displaying information about that it can't exceed the limit of 25 chars
etc. This is mostly
a better explanation to the user of the application.
Regards
/Emil
"Wim Hollebrandse" <wimATwimdows.com> wrote in message
news:u7hU$MtSDHA.3796@tk2msftngp13.phx.gbl...> Easier than using regular expressions - and more effective is by simply
> setting the MaxLength property of the TextBox webcontrol.
>
> Cheers,
> Wim Hollebrandse
> [url]http://www.wimdows.com[/url]
> [url]http://www.wimdows.net[/url]
>
> "George Ter-Saakov" <we@hotmail.com> wrote in message
> news:uJA7q$sSDHA.2276@TK2MSFTNGP10.phx.gbl...>> > What validator can validate the length of the text entered?
> > I have an input box for First Name and it must not exceed 25 characters
> > (limited in database).
> > Which validator can do that?
> >
> > George
> >
> >
>
Emil Kvarnhammar Guest
-
CFFORM Validation trumping Custom Form Validation
Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two... -
copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed... -
How to get length of string? length() problems
Simplified a bit, I'm parsing HTML documents to get sentences e.g. my $html = get($URL); # remove all HTML TAGs...blah blah blah @sentences =... -
validation summary doesnt display when there's client-side validation
I have a custom validator that validates a numeric field, txtField, that allows for thousand separators. I also placed a validation summary so... -
only custom validation control does server side validation?
On a CustomValidator you have to provide the validation code because otherwise it doesn't know what to do for the validation. Other validator... -
Vidar Petursson #2
Re: Length validation?
Hi
If regular input <element maxlength="25"
Textarea ( multiline)
myInput.Attributes.Add("onkeydown","if(this.value. length > 25) return
false");
And of course server validation is a good thing to do also
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"George Ter-Saakov" <we@hotmail.com> wrote in message
news:uJA7q$sSDHA.2276@TK2MSFTNGP10.phx.gbl...> What validator can validate the length of the text entered?
> I have an input box for First Name and it must not exceed 25 characters
> (limited in database).
> Which validator can do that?
>
> George
>
>
Vidar Petursson Guest
-
Wim Hollebrandse #3
Re: Length validation?
Easier than using regular expressions - and more effective is by simply
setting the MaxLength property of the TextBox webcontrol.
Cheers,
Wim Hollebrandse
[url]http://www.wimdows.com[/url]
[url]http://www.wimdows.net[/url]
"George Ter-Saakov" <we@hotmail.com> wrote in message
news:uJA7q$sSDHA.2276@TK2MSFTNGP10.phx.gbl...> What validator can validate the length of the text entered?
> I have an input box for First Name and it must not exceed 25 characters
> (limited in database).
> Which validator can do that?
>
> George
>
>
Wim Hollebrandse Guest
-
Wim Hollebrandse #4
Re: Length validation?
Sure - in that case go for a RegularExpressionValidator control.
As some of the other guys mentioned, a regex like ^.{,25}$ will do the
trick.
Cheers,
Wim Hollebrandse
[url]http://www.wimdows.com[/url]
[url]http://www.wimdows.net[/url]
"Emil Kvarnhammar" <emil@eqinox.com> wrote in message
news:OC5joctSDHA.1688@TK2MSFTNGP11.phx.gbl...chars> Hi, Wim!
>
> Easier to use for a developer. True.
>
> But not that advanced validation, for instance if you want to use the
> Validator controls functionality
> for displaying information about that it can't exceed the limit of 25characters> etc. This is mostly
> a better explanation to the user of the application.
>
> Regards
> /Emil
>
>
> "Wim Hollebrandse" <wimATwimdows.com> wrote in message
> news:u7hU$MtSDHA.3796@tk2msftngp13.phx.gbl...> > Easier than using regular expressions - and more effective is by simply
> > setting the MaxLength property of the TextBox webcontrol.
> >
> > Cheers,
> > Wim Hollebrandse
> > [url]http://www.wimdows.com[/url]
> > [url]http://www.wimdows.net[/url]
> >
> > "George Ter-Saakov" <we@hotmail.com> wrote in message
> > news:uJA7q$sSDHA.2276@TK2MSFTNGP10.phx.gbl...> > > What validator can validate the length of the text entered?
> > > I have an input box for First Name and it must not exceed 25>> >> > > (limited in database).
> > > Which validator can do that?
> > >
> > > George
> > >
> > >
> >
>
Wim Hollebrandse Guest



Reply With Quote

