What's the longest possible worldwide phone number I should consider in SQL varchar(length) for phone.
considerations:
+ for country code
() for area code
x + 6 numbers for Extension extension (so make it 8 {space})
spaces between groups (i.e. in American phones +x xxx xxx xxxx = 3 spaces)
here is where I need your help, I want it to ...
I've got a model that does some validation checking and adds the errors to ModelState:
ViewData.ModelState.AddModelError("mycontrol", "message")
They display fine on the view side, but is there a way to set the focus to the control that corresponds to the validation message? Right now, the page refreshes and stays at the top of the pa...
How can I forbid users to put blanks into a JTextField?
It should not even be possible to write blanks.
...
Hi,
I'm validating against XMLSchema in Java, and getting SAXParseExceptions thrown when I have non-valid content models.
I'm going to be using these exceptions to highlight where the validation has failed - but the SAXParseExceptions seem to be a little too low-level.
For example, for a failure on an enumeration, I get the validity e...
Here's a very specific coding question:
I've recently been asked to maintain some old-ish Java Swing GUI code at work and ran into this problem:
I've attached my own subclass of InputVerifier called MyFilenameVerifier to a JTextField (but it may as well be any JComponent for these purposes). I've overridden the verify() method such th...
Hi,
In my .aspx page, I have a dropdownlist and a textbox.
The textbox has to be validated depending on the selection in the dropdownlist.
I have only used the validation control on the .aspx page itself (not codebehind).
How can I dynamically change the type of validation on the textbox? programatically?
...
I can't get this CustomValidator working.
In the <head>:
<script language="javascript" type="text/javascript">
function ValidateFile(sender, args){
alert("Hi");
args.IsValid = document.getElementById("fuFile").value != "" ||
document.getElementById("c101_c7").value != "";
}
</script>
In the body...
<asp:DropDownList ID="ddl1" runat="server">
<asp:ListItem Text="First" Value="1"></asp:ListItem>
<asp:ListItem Text="Second" Value="2"></asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="tb1" runat="server"/>
<asp:Button ID="btn1" text="Go!" OnClick="btn1_Click" runat="server" />
public void btn1_Click(object sender, EventA...
Background:
I have a small problem with Eclipse. I'm working on a workbench plugin which has some classes that validate incoming XML data against a schema. The schema lives inside the plugin project in a "./schemas" folder.
Questions:
When I run the application, how can I read the schema without using a hardcoded path?
When the ap...
I have two radio buttons like so
<input type="radio" name="rush" value="yes" />
<input type="radio" name="rush" value="no" checked="checked" />
What I want to do is when the form submit button is clicked, check if 'yes' is selected.
If it is, show a javascript confirm dialog
I've gotten this far, but am stuck, any help would be appr...
I am using:
if (RadioButtonList_VolunteerType.SelectedItem != null)
or how about:
if (RadioButtonList_VolunteerType.Index >= 0)
or how about (per Andrew Hare's answer):
if (RadioButtonList_VolunteerType.Index > -1)
To those who may read this question, the following is not a valid method. As Keltex pointed out, the selected valu...
Spring's form controller (such as SimpleFormController or BaseCommandController) uses commands to pass data between the HTML form and controller. My question is, is it common practice to use the backing model as the command itself? Or is it common to create a separate command with correspond attributes to those in the backing model.
My ...
There appears to be a Validate package in Pear that I'm interested in useing in production. Our site has about 20M uniques across 10 languages, so as part of due diligence, thought I'd asked around here.
Does anyone have any experience with this PEAR package?
Is it ready for production?
Here's the Validate package in question:
http:/...
I'm working on a web application that is globalized. The development process is agile style, with several sprints already completed. Our globalization framework is good and localization efforts have been successful so far. However, we continue to run into questions during requirements development, particularly in data storage and vali...
I'm been a PHP developer for quite some time now but until today I've not found a simple way to process (aka normalize, sanitize, validate, populate and display forms and it's respective field errors).
I know that most of the PHP frameworks nowadays make this job easier but somehow I don't feel like porting all my code to one of these f...
Hello,
I'm developing in asp.net 2.0.
I'm using the asp:RegularExpressionValidator to check for a valid url.
How do I invoke the check from a javascript function?
...
What is the expression I should use in order to check for a valid url in javascript?
...
CustomerValidator: AbstractValidator<Customer>
How might one dynamically instantiate the class above if passed an instance of a Customer??
Similarly if I had:
Cat c = new Cat();
I would want to dynamically invoke the class that implements
AbstractValidator<Cat>
...
Is it normal behaviour to not get the <div class="fieldWithErrors"> wrapped arround select tags that have validation errors? I personally see no reason why the select tags should be treated differently than other form tags (input, textarea).
I do get the error in error_messages_for and error_message_on methods for that field.
PS. I hav...
I am experiencing an issue with WSDL schema validation failing when my web service response contains an MTOM attachment. After searching the web I see I'm not the only one with this problem but have not found any solutions.
It seems to fail because the web service response contains an xop:Include element similar to the following, which ...