Click here to Skip to main content
15,895,746 members
Everything / Validator

Validator

validator

Great Reads

by Edwyn Amador
Handles and validates input typing and pressed keys in TextBox, RichTextBox and ComboBox, displaying custom balloon tips messages
by DiponRoy
Knockout Validation Error Message & Bootstrap v3.2 input-group
by Dilip Nandakumar
Extending Data Annotations library to support conditional validation in WPF
by siliconvideo
This StringBox control implements keystroke validation using regular expressions and a touch of glue logic

Latest Articles

by siliconvideo
This StringBox control implements keystroke validation using regular expressions and a touch of glue logic
by siliconvideo
A NumberBox class for number entry, display, range limits and keystroke validation including binary
by Edwyn Amador
Handles and validates input typing and pressed keys in TextBox, RichTextBox and ComboBox, displaying custom balloon tips messages
by Dilip Nandakumar
Extending Data Annotations library to support conditional validation in WPF

All Articles

Sort by Score

Validator 

17 Jul 2019 by Edwyn Amador
Handles and validates input typing and pressed keys in TextBox, RichTextBox and ComboBox, displaying custom balloon tips messages
13 Jul 2014 by DiponRoy
Knockout Validation Error Message & Bootstrap v3.2 input-group
16 Dec 2016 by Dilip Nandakumar
Extending Data Annotations library to support conditional validation in WPF
22 Jul 2020 by siliconvideo
This StringBox control implements keystroke validation using regular expressions and a touch of glue logic
7 May 2013 by c_a_dunlop
Get 10 tips for revitalizing your existing static analysis implementation—no matter what static analysis tool you're using.
1 Nov 2013 by contracting1994
First here is my code, I have 2 CalendarExtender
6 May 2014 by CHill60
Try this ^(?=.*[a-zA-Z]+.*)[0-9a-zA-Z]{6,15}$Which I adapted after typing "Password" into the search engine at Regxlib.com[^]
7 May 2014 by Peter Leow
It has got nothing to do with regex, just use javascript to validate before submissioncheck-box-validation-for-atleast-one-check-box-should-cheked-in-asp-net[^]
4 Jun 2018 by arif_dzainal
Hi all,i have come confusion, how can we achieve this goalfor example, i have a dropdown, which the item is HR, Admin, ITeg : ...
21 Mar 2013 by vinodkumarnie
Try below..C# code below..protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { if (DropDownList22.SelectedItem.Text == "IT") { Button1.CausesValidation = true; } else ...
22 Aug 2013 by CodeBlack
Set validation groups to your control as mentioned below : For TextBox1 and Button1 set ValidationGroup="GroupA"For TextBox2 and Button2 set ValidationGroup="GroupB"
11 Oct 2013 by ASP.NET Community
The CompareValidator control compares the value of one control to another, or to an explicit value in the control's ValueToCompare property.
1 Nov 2013 by Sampath Lokuge
Here is the Good link which explains same issue where you're having.Check this.How to use compare validator with dd/MM/yyyy format of dateAnother Link : SOFI hope this will help to you.
2 Nov 2013 by JoCodes
Refer the links below which deals with similar issuehttp://forums.asp.net/t/1919818.aspx?TextBox+CausesValidation[^]http://forums.asp.net/t/1119411.aspx[^]Hope this helps...
4 Feb 2014 by hypermellow
Try adding the ValidationGroup attribute to your TextArea control:... something like this:
4 Feb 2014 by Abid Shk
remove the property display none of requiredfieldvalidatorprovide initial value to requiredfieldvalidator
4 Feb 2014 by Abid Shk
suppose initial value is 0 assign this value to ur textbox at design time or load time when user change this value to 10 and again insert 0 then it will work its better u use javascript function valid() { var v_type =...
30 Mar 2014 by Member 10666843
Hello All,i'm migrating asp.net application to be compatible with IE10 and old asp custom vaildation(s)doesn't work, thee's no call to the clientvalidationfunction specified in the custome validator here's the code function ProductsReqValidationManageApp(source, args) { ...
31 Mar 2014 by Code Help 2014
Such issues are mostly related to the .NET framework and browser definition files. .NET does not recognise the browser definition string correctly and handle IE 10, IE 11 versions as unknown browsers and hence the issue.If you are using .NET framework 4.0, the issues will be fixed by simply...
7 May 2014 by DamithSL
why regex? you can use client side validation using javascript or jquary jQuery see if any or no checkboxes are selected[^]and you may need do a server side validation, thenCheckBox[] checkboxes = new CheckBox[] { CheckBox1, CheckBox2, CheckBox3, CheckBox4 };if (!checkboxes.Any(c =>...
7 May 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
You can implement the technique I explained on my Blog - ASP.NET CHECKBOXLIST CLIENT SIDE VALIDATION USING JAVASCRIPT[^].
6 Oct 2014 by _debasis
Hi Mahesh, I think you can try with this rules( 'remove', rules ); Hope this helps. Thanks
6 Oct 2014 by Mahesh Pachbhai
I have tried by using .rules('remove') and it worked fine.But according to requirement,I needed to remove the HTML for these textboxes as there was autocomplete extenssion methods associated with it for intelligence and I have written generic methods to achieve this removal and generation so...
7 Apr 2020 by siliconvideo
A NumberBox class for number entry, display, range limits and keystroke validation including binary
12 Dec 2012 by Am Gayathri
Windows authentication is Clint side validation or server side validation?
12 Dec 2012 by Krunal Rohit
Very nice article is given here : Windows Authentication[^]
12 Dec 2012 by fjdiewornncalwe
That depends entirely on where your client is. If the client is on a domain based intranet, then the authentication takes place on the client when the user logs into their computer. If the client is external from the domain, then the server requests Windows credentials from the client which are...
23 Dec 2012 by Yogender Sharma
I have a gridview with checkbox & 3 fields in TemplateFields and a button outside the gridview. Two fields are in EditItem Template with asp.net RequiredField Validator. I want to fire the valiadtion only on selection of checkbox, but validation is fired whether checkBox is checked or...
23 Dec 2012 by Krunal Rohit
You need to read this : http://www.aspdotnet-suresh.com/2010/09/gridview-check-box-validation-using.html[^]
20 Mar 2013 by Prasad Khandekar
Hello,In your server side page load handler check the value of dropdown and if it anything other than IT then set CausesValidation property of the TextBox32 to false. You can also set Enabled property of chkDateReturn to false.regards,
22 Apr 2013 by Software Engineer 892
One Required field validator with multiple textboxes inside asp.net gridview footer.dear frnds,how to validate two textboxes inside gridview footer. The user can enter as below requirements :1) The user can enter in both textboxes2) the user can enter only in one textbox3) the...
22 Apr 2013 by Rai Pawan
You can use CustomValidator for this purpose.RegardsPawan
2 Jun 2013 by harsha_techi
Hello all, I have a use case were i am supposed to implement a business rule which validates input of a control against another.The trick here is there an arithemetic expression involved between the two inputs.Just to give a gist of my requirement: Assume there are two fields...
3 Jun 2013 by Rockstar_
Hi, function validate() { debugger; var t1 = document.getElementById('t1').value; var t2 = document.getElementById('t2').value; if (t1
4 Jun 2013 by Anubhava Dimri
Hi Everybody,I have a class Customermodel in which have birthday,birthmonth,birthyear properties.So i am trying to create a valid date Rules for client side that but i am not able to create it.I am facing issues at the time of birthday. because it is depend on birthmonth and...
26 Jun 2013 by askquez
i have html form which include Five input text fields and one drop-down (select) field.These text fields are showing in form with respect to drop-down options mean if i selected option 1 then three text fields will be showing and for option 2 ( 4 text fields ).I am using jquery for hide...
26 Jun 2013 by Rajkumarrr123
You can see this..It might be helpful to you if have knowledge of jquery..simple and easy to understand and customized...http://www.aspdotnet-suresh.com/2012/01/jquery-beautiful-popup-form-validations.html[^]
28 Jul 2013 by Ubaid ur Rahman IT
Hi frnds,I need validation for Office telephoneNo. with Extension.User Must enter only numbers not alphabets.TelephoneNo. must be like this... 5 digits and extension will be 4 digits01414-1954Please I need like the above, can you help me Thanks in advance.....
28 Jul 2013 by Zafar Sultan
There are numerous examples on the internet. A simple google search will fetch you thousands of pages but i will suggest you to go through this[^] excellent article. It will make you learn them and start writing them easily.
1 Aug 2013 by Ahmad Abd-Elghany
Hello , this problem drives me crazy .i have a page i call it from another page into bootstrap modal , there isa required field validator in the page with some texts and one button if i pressed the buttonits postback and drive me to the page and show the field !i tried to prevent this...
22 Aug 2013 by Rinshad Hameed
I have two texboxes and two buttons to insert data in an ASPX page. I have set Requiredfieldvalidators for both these texboxes but when i try to insert text from first textbox the validators on second textbox also show up this prevent me from inserting data. How can i solve this problem? I have...
30 Aug 2013 by SadeqHatami
hello,i use asp.net membership change password in update panel,when i fill textbox and click in submit button my texbox was reset and empty and show RequiredFieldValidator error,please enter passwordplease enter new passwordplease enter confirm new passwordand don't show any...
1 Sep 2013 by SadeqHatami
helloi have 3texbox,1button for change password (use asp.net membership change password) and use RequiredFieldValidator in updatepanel,The first when i fill textboxs and click in the button, allthing is good,but for the second time when i fill texbox and click in the button all texbox is...
1 Sep 2013 by Mahesh_Bhosale
remove the update pannel from web page
1 Sep 2013 by Member 10186638
try by removing update panel from code
9 Oct 2013 by aravindnass
heyy.. In my grid.I want validate textboxes in item template . i want to validate textbox in specific row that I want to edit..Remaining validation is disable ...Any idea..?
9 Oct 2013 by Mart Rijkers
You can use OnRowCommand in your asp definition of the gridview, specify the commandargument in your textbox definition and then in the eventhandler use GridViewCommandEventArgs.CommandArgument.
9 Oct 2013 by PoojaGahlaut
Hi, You can use validations in EditItemTemplate for validating the value to be updated in a particular row of the grid view. All kind of Asp.net validator controls can be used in EditItemTemplate, I am giving example using RegularExpressionValidator. Here the validation will work when user try...
14 Oct 2013 by Member 8566049
Hi guys,I have been working on this problem over a quarter day and tried many things but succeed.I have a custom validator that has an OnServerValidate method and it belongs to a validation group along with other required field validators. My submit button calls a JavaScript function to...
1 Nov 2013 by contracting1990
I have a TextBox with autoPostBack Set to true with a RequiredFieldValidator
1 Nov 2013 by Tom Marvolo Riddle
Quote:why page is PostBack when I have a RequiredFieldValidatorThe page get postback because of Autopostback property of textbox.Refer here:TextBox.AutoPostBack Property [^]
7 Nov 2013 by v03051435
hi guys,i want to use customValidator.ClientValidationFunction = fnClientFunction.customValidator in validator groupe "group1"andfunction fnClientFunction(source, args) { .... }this customvalidator fires just for a gridview's textbox column where row numbers > int iso how...
24 Nov 2013 by Reda Makarem
Hey all,this is really strange.I have a form with appropriate validation set for each fieldwhen the submit button has code inside its click method the validation wont firei tried commenting out everything in the click method and when i did all the validation worked fineI even...
28 Jan 2014 by Sampath Lokuge
Please check below mentioned links.May be helped to you. :)A comprehensive regex for phone number validationPhone validation regexexample of a regular expression in jquery for phone numbers
29 Jan 2014 by ravikhoda
i have required validator on my screen. which has display = dynamic. now this will render as span on mozila and chroma when view page source bt with display none property. but on IE 11 this control not even render on page view source and that's why i get object null ref error when i use that...
6 May 2014 by Muhammad Taqi Hassan Bukhari
Need to have a regex for accepting alphabets or alphanumeric with the length of 6 to 15, and should not accept numeric only. i have this one , ^[a-zA-Z0-9]+$.... but not according to my reg
6 May 2014 by Kan07
public bool IsAlphaNumeric(string inputString){ Regex r = new Regex("^[a-zA-Z0-9]+$"); if (r.IsMatch(inputString)) return true; else return false;}Verifying that textbox text contains only alphanumeric value as well as space character through Regular...
15 Aug 2014 by Muhammad Taqi Hassan Bukhari
I am working on my final year project, I have a login page, on which i applied validation,Look at this : http://decsys.somee.com/Login/Login.aspx[^]I want to show that validation of both the text field in just one line. How can i do that;Look at this what i want:...
16 Aug 2014 by Peter Leow
Use ASP.NET ValidationSummary Control[^]Set the DisplayMode = "SingleParagraph"
2 Sep 2014 by Member 11034643
In this we add rows and column from .csv file to Data Table and want to apply validation that If any mismatch datatype is found in rows of any columns then messages Displayed which line and column have mismatched datatype.. protected void InsertDataIntoSql(string csvfile) { ...
2 Sep 2014 by George Jonsson
You need to specify the data type of each column and check data against that.This is one way of many for how you can do it. I hope it can help you on the way.dt.Columns.Add(t, typeof(int));dt.Columns.Add(t, typeof(double)); etc.As you are doing this in a loop you need an array...
6 Oct 2014 by aJAY SUWALKA
Hi I would want to have validations something of this sort[RequiredCustom(ActionType=(int)Action.Update, ActionType=(int)Action.Delete)]public string NotesID { get; set; }[Required][RegularExpression("1|2|3|4")]public int ActionType { get; set; }I would want to validate this...
5 Feb 2015 by srikanth_ic
Hi,PlZz Help me any one.Here my problem is I want two date filed as “From” and “To”. “From” must me with is 7 days before today (if today is 6th feb 2015 it accepts only 31st jan 2015 to 6th feb 2015) and “To” date must be today or yesterday (5th feb 2015 or 6th feb 2015). If I select...
15 Feb 2015 by srikanth_ic
I found answer to this.http://forums.asp.net/t/2033949.aspx?asp+net+Validating+two+date+fields+when+1st+must+be+within+7days+before+today+2nd+is+today+or+yesterday
12 Mar 2015 by Thoppil2
Is Required field validator is a client side validator or server side validator?
12 Mar 2015 by Deepu S Nair
check thishttp://forums.asp.net/t/1880395.aspx?required+field+validator+is+client+side+or+server+side+in+net+[^]
16 Mar 2015 by Parazival
in my web page all requirefield validator in one paneland this panel will occupy some place but it is not working, if i visible that panel requirefield validator are not working. Please help me, thanks in advance
16 Mar 2015 by Pankil Bhatt
Hello,Use the ASP.NET ValidationGroup PropertyExample:
27 Mar 2016 by Member 1911428
I need help to implement the answer Google Recaptcha 2.0.I've tried a few ways to recover the response after sending the form but not consigui get the answer True.Follows the example I'm trying:
25 Jun 2015 by raul313
hi,i am creating an user control for datepicker in asp.net. i have used AjaxControlToolkit for create the UC,here i have used CalendarExtender,MaskedEditExtender and MaskedEditValidatorhow do i dsiplay an image error in MaskedEditValidator instead of InvalidValueMessagelike in...
30 Jun 2015 by njammy
Wrap the validator inside a div which has attributes display:none.Create a css style which defines a background. position it to fit the image.Set the css of the div to the style tag of the background image above.Detect when there is an error, then remove the display attribute so that...
5 Jan 2016 by itsureshuk
Hi Friends, Bootstrap validation and datetimepicker is not working in Firefox. Reason found is $(document).ready(function () is not working in Firefox. Validation code and Datetimepicker methods called from $(document).ready(function () . What would be the reason not loading ? Please...
27 Mar 2016 by RayFrye
I could never get any of the Google Captcha's to work. I finally found this site and it was a snap to implement.Classic ASP (VBScript) and ASP.NET (VB.NET) Security Image (CAPTCHA) Generator[^]
6 Apr 2016 by nawazish12khan
did u set ValidationGroup="cats" property of Button
13 Apr 2016 by Minstrel Prince
Please I need your urgent helpI am working on an mvc5 view where users fill in their details inorder for their order item to be delivered...When users select their state from an mvcdropdownlistfor, the drop down for city is auto populated by jquery calling the controller function to...
31 Oct 2016 by MT_
Hi,I have added required field validators on my page and ValidationSummary to show the messages. When I submit the page, it shows all the validation messages in the summary and text adjacent to control. Now, when I enter some text in the textbox and press tab, the text besides the control...
31 Oct 2016 by Richard Deeming
There's no built-in option to do that, and with good reason.Firstly, the page will be jumping around as the user types. This will cause accessibility problems and annoy your users.Secondly, until the user submits the form, there is no way to know which validation group needs to be...
19 Mar 2017 by 心心傷心
I want to validate a username from database using bootstrap validator in asp.net. This is some code i tried but not working... When i put remote, the username field is always invalid. Is this correct way to do so?What I have tried:username: { validators: { ...
19 Mar 2018 by Peter Lucansky
Hello, I am trying to validate XML (a.xml): by schema(a.xsd): ...
8 Jan 2019 by TheBigBearNow
Hello all, I am validation off bootstrap currently so it validates all $(“:input”) and I use a switch statement so it does case “text” case “password” and case “textarea” I want to validate a case “email” or by the #ID and have it be with the same CSS of of a textbox. Because I have floating...
25 Jun 2020 by Member 14779968
I am currently testing APIs and I want create a generic validator that will validate the json properties and its values to the Model. For example I have the following Json response from the server { "id" : 1, "name" : "John", "age" :...
25 Jun 2020 by MadMyche
This is not valid JSON{ id = 1, name = "John", age = 30 } As the names (id, name, age) are all required to be wrapped in quotes as they are strings.RFC 4627 2.2. Objects An object structure is represented as a pair of curly...
19 Aug 2020 by Ahmed Yasin
Well I am using django 3.0.3 and python 3.8.5.. ValidationError is not raising error even I am entering different emials... I have tried so many possible way to raise error but non of them work.. What I have tried: ------forms.py------- ...
10 Sep 2020 by jacky4lad
Required Regular expression Validation Start two Fixed character and then after Numeric fixed Character. Example: if character start with AB then allow 20 character - Length : additional 20 numbers. - Example : ABcD3456789012345678cc...
26 Aug 2020 by OriginalGriff
Try: ^(AB\d{20})|(XY\d{14})$ But ... your second example doesn't match the initial description of "additional 14 digits"
27 Aug 2020 by Patrice T
Just a few interesting links to help building and debugging RegEx. Here is a link to RegEx documentation: perlre - perldoc.perl.org[^] Here is links to tools to help build RegEx and debug them: .NET Regex Tester - Regex Storm[^] Expresso Regular...
21 Oct 2022 by Richard MacCutchan
If you have an issue with a CodeProject article then please post your message in the forum at the end of the article. The chances of the author seeing your message here is not very high.
29 Oct 2016 by rohit7209
jrValidator provides a set of JavaScript functions to validate HTML forms
15 Feb 2016 by Oğuzhan Soykan
Automated monkey or specific validations for WCF or REST services with Fluentvalidation and CastleWindsor
2 Dec 2013 by Gerald Gomes
A very simple example of displaying validation error next to controls in WPF
4 Jul 2014 by DiponRoy
Using Observable and Computed for validation in Knockout
7 Nov 2016 by Wahid Bitar
Validated the unique constraints at dbContext ValidateEntity in a generic way by reading the IndexAttribute values.
5 Oct 2014 by Mahesh Pachbhai
I am using asp.net mvc Client-Side Validation .Here I am generating the html of input textboxes dynamically and also adding the validation messages and validation rules dynamically for these inout text boxes. Html += '
7 Nov 2013 by JoCodes
You can use custom validator control or javascript for the validation. Anyways, if the Gridview validations are supposed to be Gridview Edit or Insert mode so that row only will be validated.Refer the below link to check how to implement it...
25 Jun 2014 by EmanueleC70
I need to create a form using kendo validator with angularjs. I know how to validate in angularjs and in kendo, but i need to understand how to use angluarjs integrate with kendo in order to create a custom validator. I wanto to set in angularjs the custom rules and give validation error message...
18 Jul 2017 by Rockstar_
Hi Friends, I have a form need to do validation for Mobile numbers, the problem is the form can be filled by world wide, so the problem is ex. for India:10 digits and 2 digits country code and for Singapore 8 digits number and 2 digits country code. So that i want to keep minimum 8...
26 Mar 2014 by calincoosmin
Hello.I want to build an application in C# that receive a URL ( Ex: "www.codeproject.com" ) and return if that site was build in html, html5 or contains PHP. How can i do this ?Thanks!
16 Sep 2014 by RajeevKumarSharma
Hi All,I have a page where every control is dynamically being add such as Textbox, validator and button. On submit button if any validation alert comes then other submit button is not working in First Click but in 2nd click it's working fine. Or without any validation alert other submit...