validation

Wpf ComboBox validation Trigger

I have a editable combobox that text is bound to an object property. I have associated a exceptionsValidationrule with the text property and it is working and turning the control red. I need to also disable a button but I can't seam to find how to check the validation.haserrors in this case my XAML for the combo box <ComboBox Margi...

Why is this validation method now rejecting all our html

The following snippet has worked for validating user entered html snippets for ages, now in past day it started rejecting everything. public override bool IsValid(object value) { var isValid = true; try { var doc = new XmlDocument(); doc.LoadXml(string.Format(@" <!DOCTYPE html [<!ENTITY % xhtml-l...

Flex: Validator on RadioButtonGroup

I have a Validator on a RadioButtonGroup of 2 Radios. There's a checkbox above the RadioButtonGroup whereby if checkbox.Selected, then the Radios are enabled. So the Validator is required if the checkbox.Selected. So far so good. The problem is once a radio gets selected, the RadioButtonGroup selectedValue gets set. When I uncheck th...

ASP.NET Form Validation Doesn't work first time

<asp:UpdatePanel ID="LoginPanel" UpdateMode="Conditional" runat="server"> <ContentTemplate> <div id="login"> <div class="row"> <div class="label"> <asp:Label ID="lblUsername" Text="<%$ Resources:Login, UserNameField %>" runat="server" /> </div> <d...

WTforms validation

Hi I have a form class which looks like below:- class UserCreateForm(wtf.Form): name=wtf.TextField('Name',validators=[validators.Required(),username_check]) email=wtf.TextField('Email') userimage=wtf.FileField(u'Upload Image',validators=[checkfile]) The custom validator function " checkfile" looks like this:- def checkfi...

wpf validation rule: validate integer with dot instead of comma

Hi, I'm working on a c# wpf application in which I want to validate user input in a textbox. I have a validation rule like this: public class NumericRule : ValidationRule { /// <summary> /// Checks whether a value can be converted to a numeric value. /// </summary> public override ValidationResult Validate(object value,...

Custom DataTypeAttribute not triggering validation correctly

Related to this question I have created my own DateValidationAttibute to make sure a string is in a valid date format (e.g., MM/DD/YYYY) [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] public class DateValidationAttribute : DataTypeAttribute { public DateValidationAttribute() : base(DataT...

'IDataErrorInfo' is a 'namespace' but is used like a 'type' - WPF

I try use IDataErrorInfo in WPF app on validation data, but if I try implement interface IDataErrorInfo in my class, I get this error: 'IDataErrorInfo' is a 'namespace' but is used like a 'type' I using namespace System.ComponentModel. Any advance. code is here: public partial class MainWindow : Window { public class Frien...

Please Help me about preg match Validation

I need to validate a password it should have the following requirements: The password should have at least 8 characters The password should have at least 1 uppercase, 1 lowercase, 1 number, and 1 special character The password should have no continues character(ex. 12345 or abcd) Please help me to do this.. any suggestions will be...

In ASP.NET is it dangerous to get a URL via URL ?

It's possible to get a string via Request.QueryString.Get("url") but ASP.NET raises an exception: "A potentially dangerous Request.Path value was detected frfom the client". I'm not gonna trust this url for any purpose (for example just redirecting client to that url). Am I supposed to change my design or simply turn off the ASP.NET exce...