data-validation

Data authorisation using WCF web services

I am new to web development and WCF. I am reading some basics about it and most of the things seem very interesting. I have read that WCF services can be exposed using SOAP and other protocols. I was wondering whether there is an explicit implementation against data corruption during transmission built-in or it is left to user? For exa...

How does one cheaply validate the existance of a column in a table in another schema with Oracle?

The environment is Oracle 9 & 10. I do not have DBA level access. The problem is to verify that a specific column exists in a specific table, in another schema. There are two cases to deal with. Another schema in the same instance A schema in a different instance, using a db_link Given my schema FRED and another schema BARNEY...

Less Linq to SQL and more Repository way to provide Rule Violations?

In the nerd dinner, they use partial keywords to overload the Linq to SQL classes to embed the data validation. Let's say you want to data validate exclusively in the repository. Is there some website link out there that shows how to construct this in a way that can feed the Html.Validation helpers seamlessly? I heard this is changing...

Where to perform the data validation for a desktop application? On the database or in code?

In a single-user desktop application that uses a database for storage, is it necessary to perform the data validation on the database, or is it ok to do it in code? What are the best practices, and if there are none, what are the advantages and disadvantages of each of the two possibilities? ...

Cake PHP - Form Validiation doesn't work

Hi everybody, my CakePHP (1.2.5.) doesn't validate my form correct. $this->UserData->save($this->data); gives me always a true value back. I can't find the problem. The label for UserData.nichname works. That's the View: <?php echo $form->create('UserData'); echo $form->error('UserData.nick_name'); echo $form->input('UserData.nic...

Capturing International Personal Data (Name, Address, Phone, etc) ASP.NET

I am looking for the best way to capture and validate US & international personal data. I have to use ASP.NET 2.0 (vb.net) and no 3rd party web services. This are all client restrictions. The main point of this is I have to toss their data to FedEx for a shipping quote. I think FedEx has a address checker but that web service was not a...

Excel Data List Validation in Powershell

Hi, I have a range named "STATE". I want to set data validation in range ("A1") to only take value within this range using Powershell. Below is what I have tried. Does not work. I dont know what to put as 4th and 5th parameters. The first 3 are Excel constants equivalent to xlValidateList, xlValidAlertStop and xlBetween respectively. ...

Data validation: fail fast, fail early vs. complete validation

Regarding data validation, I've heard that the options are to "fail fast, fail early" or "complete validation". The first approach fails on the very first validation error, whereas the second one builds up a list of failures and presents it. I'm wondering about this in the context of both server-side and client-side data validation. Whi...

data validation on wpf passwordbox:type password, re-type password

Hello Experts !! I've built a wpf windows application in with there is a registration form. Using IDataErrorInfo i could successfully bind the field to a class property and with the help of styles display meaningful information about the error to users.About the submit button i use the MultiDataTrigger with conditions (Based on a p...

XAML: Refer to StaticResource in plain XAML? (without markup extension)

I am setting a validation rule on a series of textboxes. I'd rather not create a new instance of my custom validation rule for each TextBox... <Window.Resources> <my:IsIntegerRule x:Key="IsIntegerRule"/> </Window.Resources> ... ... <TextBox> <TextBox.Text> <Binding XPath="@num" UpdateSourceTrigger="PropertyChanged" Mode="T...

Comparing string before and after DB save in Rails?

Hi all, I am trying to validate uniqueness on an article description. After I save it to the DB, if I retrieve it it comes back in a stripped down format (missing some chars). If I put a validator on the uniquness of the text in the desc. it doens't get called. If I do a find_by_desc it fails since the text is slightly different. Any i...

ASP.NET MVC 2: Use [Data Annotations] to reference methods that could feed DDL lists?

A generally accepted way to pass all data to a view is to have a single data model with references to both your domain model and additional data for things like drop down lists (DDL). However, partial views (view templates too) receive only a portion of the main model, not able to access the root of the Model sent to the original view. ...

ASP.NET MVC 2 Data Validation: Make C# Regex work for both C# and JavaScript simultaneously?

I have this C# regex: ^\s?((?<qty>\d+)\s?/)?\s?[$]?\s?(?<price>\d{0,2}(?:\.\d{1,2})?)\s?$ and use MVC's data validation at the client. JavaScript says this regex is invalid, although C# works perfectly fine. Any idea how to get it to work for both C# and JavaScript, since it doesn't seem possible to provide a separate JavaScript Reg...

ASP.NET MVC 2 Data Validation: Does this carry from a DomainModel to a ViewModel?

Given my understanding of MVC and DDD (critique as necessary): Domain Models can be created by Factories, and persisted by Repositories. These are POCO objects. View Models contain partial or complete Domain Models as needed by the view. They are generated by a service that interacts with a repository. Thus Domain Models never make ...

Wich is the best way to validate data in a JTextField?

I tried this, but the JTextField keeps showing the last key entered. What I'm I doing wrong?... private void codigoKeyTyped(java.awt.event.KeyEvent evt) { //codigo is the JTextField String s = String.valueOf(evt.getKeyChar()); try{ Integer.parseInt(s); }catch(Exception e){ codigo.setText(""); } } ...

Checking Excel 2003 data validation

The following bit of VBA will highlight any cells in a sheet with data validation errors: Sub CheckValidation(sht As Worksheet) Dim cell As Range Dim rngDV As Range Dim dvError As Boolean On Error Resume Next Set rngDV = sht.UsedRange.SpecialCells(xlCellTypeAllValidation) On Error GoTo 0 If rngDV Is Nothing Then sht.ClearCircles E...

Where to validate user input in a program?

Let's say I have to implement a program for a small clinic company that allows its users(this is, the doctors) to schedule consults, log clients medical histories, etc. So, this will probably be the standard 3-layer application: Presentation, Controller and a Data Layer (that'll connect to a database). I see 3 possibilities: My first ...

ASP.NET MVC2 and JSON model binding with validation to an action method

Phil Haack's blog entry describes this process using ASP.NET MVC 2's futures and Crockford's json2.js. John Resig also recommends using Crockford's json2.js in this article regarding "use strict";. To get this feature today, would you still download the MVC 2 Futures, or is this included in the MVC 2 final, or is this part of the new M...