requiredfieldvalidator

Ignore requiredvalidator in logout

Afternoon all. Here's an easy one for you that I can't figure out. I have a requiredfield validator that is doing its job too well! Upon the lnkLogOut, the user should be logged out but the requiredfield validator is preventing this. protected void lnkLogOut_Click(object sender, EventArgs e) { Session.Abandon(); ...

Validate 1 of the 2 fields with asp.net validators

Hello, I've got a simple form with some textboxes. These textboxes all have a RequiredFieldValidator. If field 1 is filled in I need to disable the RequiredFieldValidator of field 2 because only one of these fields is required. What is the best way to accomplish this? ...

How to Make the RequiredField Validator visible

Using javascript or jquery, how can I make a Required Field Validator control (of ASP.NET) visible. If we check the viewsource of the Required Field valiator, we can see that the visibility is false initially. $("#spanReqFieldValidator").show() / fadeIn() wont work. Any thoughts ? From googling, I understand that jQuery has some issue...

RequiredFieldValidator not working under firefox

Hi guys I use 2 requiredfiledvalidator for 2 selects, one is working but the second one (the one I need) isnt <asp:dropdownlist id="ddlMod" runat="server" Width="235px" AutoPostBack="True" Font-Names="Arial" Font-Size="XX-Small"> </asp:dropdownlist> <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" Font-Names="...

RequiredFieldValidator Issue

My requiredfield control is validating the "SEL"(default invalid value) value but when I do change the value to a valid one, the ErrorMessage/Text does not disappear until I submit the form again. <asp:DropDownList ID="ddlDocumentType" runat="server" DataTextField="Description" DataValueField="Code" /> <asp:RequiredFieldValidator Contr...

Problem in using RequiredFieldValidator for validating FCKEditor

Hi When i use RequiredFieldValidator for Validation FCKEditor , The first time that the form gonna submit , RequiredFieldValidator prompt (ErrorMessage) and indicate that FCKEditor is empty , while it isn't . Again if you try to submit the form , It's OK and there is no problem .At this case user have to hit the submit button twice ...

Dynamically enable or disable RequiredFieldValidator based on value of DropDownList

I have an ASP.NET form with three text inputs, one each for "Work Phone", "Home Phone" and "Cell Phone". Each of these text inputs has a RequiredFieldValidator associated with it. I also have a DropDownList where the user can select the preferred phone type. I want to only require the field that is selected in the DropDownList. For exa...

Required Field validator disappears on dropdownlist post back

Hi, I populate two dropdownlist in asp.net. Both are assigned to a required field validator. The codebehind is as below if (!Page.IsPostBack) { DataTable dt = new DataTable(); dt.Columns.Add("emp"); dt.Columns.Add("ename"); for (int i = 0; i < 5; i++) { ...

Enable/disable RequiredValidator on client-side / CustomValidator not firing

I've got a drop-down where the user selects a Country. It is a required "field". Next to it, there is a textfield named State. If the user selects US, then the field State is required. If the user selects e.g. Sweden, the State is not required, since Sweden has no states. Example code: <asp:DropDownList runat="server" ID="Country"></a...

ASP.Net WebForms requiredfieldvalidator not working in FireFox?

I have a WebForms app that uses a field validator on a dropdownlist. It works in IE but not FireFox. This is pretty straightforward stuff I'm doing. Here are the setups for the dropdown and validator: <asp:DropDownList ID ="dmbFileActNo" runat="server" CssClass="DROPDOWN_MEDIUM" AutoPostBack="True"></asp:DropDownList> <asp:require...

Field validators in asp.net

Is it possible to have "Required Field Validator" controls to validate more than one field (example I have 12 textboxes that are required. I want to try an avoid having 12 RFV controls. If a validation does get triggered, is there a way to display a customized message ("textA is empty" or "textB is empty") etc.? ...

how to make requiredfieldvalidator error message display after click submit button

now, the error message will display if I move out of current textbox. I don't want to display it until I click submit button. ...

ASP.NET required field validator firing on focus in firefox

I have 2 asp.net textboxes in an update panel. Both textbox controls have some javascript attached to autotab to the next field and to allow only numeric input. When I enter some data into the first field and press enter, focus shifts to the next field and the requiredfieldvalidator of the second field displays its "* required" error mes...

Can I prevent RequiredFieldValidation from triggering against postbacks from a specific control.

I have a web form with a number of textbox controls which I've associated RequiredFieldValidator's with. I have a ValidationSummary control on the page to render any incomplete fields when I submit the page. However, I've just had to add an image upload facility to the same page, and have an 'Upload' button which I have posting back to ...

Define markup for [Required] fields in View in ASP.NET MVC 2.0

Hi, We have a model with properties decorated with [Required] which works great for validation. However, what we'd like to do is mark those required fields in the view with an asterisk (or some other style) to denote they are required before the user enters any data for validation. I don't seem to be able to find anything built into t...

requiredfieldvalidator on a checkbox created programatically in vb.net

this is part of code for my checkbox. For Each c As Contact In contacts.Entries counter += 1 tr = New HtmlTableRow tc = New HtmlTableCell Dim chkbox As New CheckBox chkbox.ID = "id_" & counter tc.Controls.Add(chkbox) tr.Cells.Add(tc) Next now this ...

cakePHP "required" validation

is there any mistake in this validation??? var $validate = array( 'brand_id' => array( 'required' => array(true), 'message' => array('select a brand'), ) ); brand_id is a select box It show error as "message" instead of "select a brand" if the message is not in array it shows error Warning (2): preg_match() [function.p...

asp.net usercontrol SetFocusOnError

I have a aspx page that several of the same usercontrols on the page. The usercontrol houses a textbox that has a Required field validator on it. The validator works but the setonfocus="true" does not seem to be working, further more, the button the aspx page when the validator shows the error message, the button still fires the code b...

Date format in RangeValidator

I am using RangeValidator to validate date enter in textbox and its working fine with default date format but now i want the date format in "dd/MM/yyy" but its generating excption with this date format. please provide me solution my code: in aspx page: <asp:TextBox ID="txtrequiredby" runat="server" ></asp:TextBox > <cc1:CalendarExtende...

RequiredFieldValidator works on dev and stage environments, not production

We deployed our legacy ASP.NET application to production after successful test deployments to our staging environment. The application makes use of RequiredFieldValidators on one particular registration page. On our development and stage environments, the validators successfully detect empty fields when "Submit" is clicked, error messa...