DataAnnotations or Application Validation block
Whats the difference between DataAnnotations and Application Validation Block? ...
Whats the difference between DataAnnotations and Application Validation Block? ...
I have a TextArea which allows the user to enter HTML, what I am now trying to do is to validate the users HTML to ensure it is XHTML. Any ideas? ...
Gentlemen, I have a button bounded on Validation.HasError property of a textblock. The textblock has a validation rule that checks the value entered by user. The purpose of the binding is that the button should be disabled if the user enters a wrong data. The problem is that the ValidationRule executes AFTER the binding. So when the u...
Hello. Since Delphi does not have any regular expressions library built-in, have you seen a good function to validate email addresses at least to some degree in using only Delphi RTL/VCL? I don't want to link additional *.dll to my product integrating regular expression support and I need also Delphi 7 compatibility. Embedding regex l...
Hi guys, i'm having issues with implementing a ViewModel class which acts as a wrapper class around a Model class called "User" generated by L2SQL. In short, I have two instances when i have to validate against the L2SQL model. One when the user first signs up, and the second when the user logs in and edits only part of his account data....
Hi have this model public class UserModel { [Required(ErrorMessage = "Le nom est requis.")] [UIHint("String")] [DataType(DataType.Text)] [DisplayName("Nom")] public string Lastname { get; set; } [DataType(DataType.Text)] [UIHint("String")] [DisplayName("Prénom")] p...
I need to validate a form in php and display some error messages in the view if there are validation errors. The problem is that once the form is submitted, sending the user back to the page will clear all the of the completed form fields. Is there a simple way to not lose the unvalidated form data? The only solution I can come up with...
I was wondering how to make it so that I could make a rule where a field is not equal to a value. Like I have a field called 'name' so I don't want 'name' = 'Your Name.' Does anybody have an idea of how to do this? thanks for any help. ...
When i validating my site i got following issue <embed src="banner.swf" quality="high" pluginspage="http://www.macromedia… ✉ You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" docu...
I have a couple of asp.net textboxes that are populated using a jQuery ajax function. These textboxes also got a asp.net RequiredField validator attached to them. Problem: Although the textboxes got values, the requiredfield validators are set to invalid. Any workaround for this that makes it possible to still use the asp.net validators...
Hi! I’m adding authentication for my WCF services, and I’m looking at the UserNamePasswordValidator and the Membership Provider, for me it seems like they do the same, but you get a lot more user function when using the Membership Provider. Since I only need the user/password authentication, my DB has all the user and role data, I was j...
Hello all. I have the following scenario. I have a search page which is split into two divs. In the first, a user can create query parameters using a range of drop down menus. In the second div a user can enter text to source the query parameter and narrow the search further. On the drop down selectedindex change event, a radio butt...
I have a MaskedTextBox control with the mask "00/00/0000", the PromptChar "_" and the ValidatingType of DateTime, bound to a DateTime column in a database that can also accept null values. I'd like the user to have to enter either a valid date, or leave it blank (i.e. "__/__/____") for a DBNull. By using the TypeValidationCompleted eve...
Hi, Using PHP / Mysql all encoded up as UTF we have recently had to start capturing non-Latin characters such as Chinese etc. We have php validation that checks on string length and alpha numeric such as if (!ereg("[[:alnum:]]{2,}",$_POST['company_name'])) { //error code here } This is not working on multi byte chars. I understand ...
Hi everyone, this is probably very simple, but I can't seem to figure it out... I'm currently using a UserControl to replace form fields to input text on a touch screen. This UserControl is essentially a Button displaying the current text and a pen icon, opening a separate screen keyboard window when pressed. It also needs to validat...
I have a series of checkboxes on a form. One or more must be checked, and if not I want to display an error icon on them until one of them is. My IDataErrorInfo implementation looks like so: public string this[string columnName] { get { switch (columnName) { case "option1": case "option2"...
I really was trying to avoid asking this question. I have seen quite a few posts on SO regarding this plugin but they still didn't quite get it for me. Right now I have a new account registration form and I'm trying to write a custom method for validating a unique username. I would like to think that the following should work: $.validat...
Curious what the best practice is for returning errors to a view from a controller where the error isn't really a validation error, but more like "user not found" or "service timeout" type of errors. (in ASP.NET MVC2 framework) I've been adding them to the ModelState's model errors, but that doesn't seem appropriate. (although easy to i...
I'm trying to bind a property in my DataContext to a property in a ValidationRule: public class ReleaseValidationRule : ValidationRule { // I want to bind a value from my DataContext to this property: public CheckboxViewModels ValidReleases { get; set; } ... } Based on this thread, I created the CheckboxViewModels class ju...
Say I have CompaniesController which uses a CompaniesService. And the Companies Service is where I do all my Business Validation so it requires I pass it the ModelState (Im using a ModelState Wrapper following this... But since I added Ninject to my project I cant figure out how to inject the ModelStateWrapper into the CompaniesService.....