one of the fields on my form is a textbox that the user types an id. this is the foreign key to another table so I need to bounce the data against that table before letting them submit. I'd rather not use textchanged as every letter they type may incur another query, focus lost would only show an error or validate when they are already i...
Hello Everyone
I am looking for a best-practise approach on how to do UI-validation in a model-view-presenter architecture.
I need to validate some forms with a lot of controls, and to make it easy for the user I store all errors or warnings with a reference to the control in a Log which is displayed to the user afterwards, so he can ...
Hey Stackoverflow.
Say I have a table with the following layout:
Id Int PRIMARY KEY IDENTITY
DateFrom datetime NOT NULL
DateTo datetime NOT NULL
UserId Int
UserId is a foreign key to a users table, and well obviously there's more data which is irrelevant to this question.
What I want to do, is to make sure that per User, there can ...
So I have a couple of forms done in asp.net/c# that I need to validate. If one of the validators fails, I’d like to change the class for the text box and the label on the client side/post back. The way I’d usually do this is by manually validating the forms client side and server side. Is there a way to do this using validators instead o...
I'm going through the railscast no 73 (http://railscasts.com/episodes/73-complex-forms-part-1), where Ryan Bates explains how to use multiple models in a single form. He creates a project object, along with its tasks, in a single form (A simple app, where you create a project and its associated tasks)
It works well, but I'm not sure ho...
I have a TableViewer with an ICellModifier which seems to work fine. I set an ICellEditorValidator on one of the cell editors, though, and I can't get it to behave the way I would like. Here's my abbreviated code:
cellEditors[1] = new TextCellEditor(table);
cellEditors[1].setValidator(new ICellEditorValidator() {
public String isV...
What is the best way to restrict "number"-only input for textboxes?
I am looking for something that allows decimal points.
I see a lot of examples. But have yet to decide which one to use.
...
I have a class with lots of string properties that need validated. I'm using the Validation Application Block because I'm a big fan of using attributes to solve this kind of need. Everything works great but my manager isn't a fan of the amount of code needed in implementing the Message Template Tokens and resource file.
For example:
...
Note:
Posting this as a separate question as per Brian's comment (from http://stackoverflow.com/questions/892624/how-to-handle-multiple-models-in-a-rails-form)
I'm trying to learn the best way to handle multiple models in a single rails form, when the models are both nested and non-nested. For the nested ones, I found these two tutoria...
I have a server with lots of video files. After a restore, I noticed that the checksum of a couple of files changed. Since I don't have checksums for all files, I wanted write a script to verify the file integrity. It's simple for archives (tar t, unzip -t, rar t, etc) or images (convert image.jpg /tmp/test.png).
Which options do I need...
As part of my build process I want to validate XML files against a Schema (XSD). I'm trying to use the schemavalidate task like this:
<schemavalidate noNamespaceFile="schemas/Model.xsd" file="Model.xml"/>
This yields the following error:
[...]
BUILD FAILED
build.xml:65: The following error occurred while executing this line:
build.x...
I have a form which you can post a file over to my server.
Is there a way, without using a custom HTTP handler, to intercept the start of the post and prevent it before the file is uploaded and bandwidth used up.
So for example, I could check an IP address and if it's blocked in my system I could stop the request before I waste 10MB of...
I have a SL3 application in which I'm using DataForm for my data entry. I want my form to look in the way I like it, so, I use <dataControls:DataForm.EditTemplate> and inside the template I have my good looking form design.
the main issue is, inside the template I have to use normal controls (like TextBox) instead of the "field" control...
I have an aspx page in which i have 3 asp.net text boxes and 1 asp.net button control.I want to do a client side validation before the post back happens when i click on the button . ie ; If the the page passes the validation check,then only i need to invoke the server side button click event.Can any one help me ? Thanks in advance
...
Hi Buddies,
How can i restrict users fro entering special characters in the text box.I want only numbers and alphabets to be entered ( Typed / Pasted )
Any Samples ?
Thanks in advance
...
I have this action:
public ActionResult Add([Bind(Include = "Title,Description")] product product2Add){
--SNIP--
}
I'm using a view model pattern where I've created a special "AddProduct_ViewModel" class that contains my product class and anything else I need in my view. That includes 2 dropdownlists; one that does a DB lookup of all ...
As far as I can tell, JAXP by default supports W3C XML Schema and RelaxNG from Java 6.
I can see a few APIs, mostly experimental or incomplete, on the schematron.com links page.
Is there an approach on validating schematron in Java that's complete, efficient and can be used with the JAXP API?
Thanks
...
I have got my resource file with the help of
string filePath = Assembly.GetExecutingAssembly().GetName().Name+"." + resourceFileName;
Stream fileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(filePath);
Now i have to use fileStream to compare my xhtml file against the DTDs that are embedded inside the resource...
I have an ASPX page where in the page load i am dynamically creating some radio button list controls and rendering to browser.I will have 2 list items in each radio button list .One is Yes and second is No. The number of Radio buttonlist can be n.Now in my java script code, i want to know which radio button is clicked . I m already using...
I'm developing a VB.NET 1.1 web application. All validation and RegEx controls work perfectly when testing on my local machine using IIS 5.1, however when I deploy to our "leased" web server utilizing IIS 6.0 I'm either getting a "System.FormatException: String was not recognized as a valid DateTime" error on the date fields (worked on l...