Querying and format validation of json (analogous to XSD)
Any good ideas about analogues for XSD (i.e., "schema validation") for JSON? My search engine skills are failing me. (FWIW, I'm coming at it from Python.) ...
Any good ideas about analogues for XSD (i.e., "schema validation") for JSON? My search engine skills are failing me. (FWIW, I'm coming at it from Python.) ...
Here is the buddy class used to add data annotation validators to a Entity Framework model: [MetadataType(typeof(Result_Validation))] public partial class Result { } [Bind(Include = "Title,Description")] public class Result_Validation { [Required(ErrorMessage = "Title is required")] public string Title { get; set; } [Requ...
I need to implement a wizardy, dynamic UI that uses complex validation of the style: If A = 1, show controls B, C, D. B is required, C is not, and D is not required must be less than 30 if it is populated. If A = 2, show controls B, D, E. B is not required, D is required but has no limits, and E is not required. If B is not null, show ...
This schema used to work on our Biztalk 2004 environment but throws an error when compiled in Biztalk 2006 R2. <?xml version="1.0" encoding="utf-16"?> <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://Project.Schemas.External.ScheduleRepair" attributeFormDefault="unqualified" elementFormDefault="qualified" xml...
I have the following validation method in my viewmodel (example is showing only one column, "ItemNumber"): public bool IsValid { get { foreach (string property in ValidatedProperties) if (GetValidationError(property) != null) return false; return true; } } static readonly string[] ValidatedProperties = { ...
(I know there's some close duplicates out there, but none of them were able to help me, please hear me out) I have the setters of my model throwing appropriate exceptions when something attempts to set an invalid value. This works wonders for validation when the user types a new value. However, when I create a new model object, the ini...
I've scoured the internet and have yet to find a solution. Help me Stack-Overflow-Kenobi, you're my only hope! So I've got this Silverlight application, right? And I have a combobox that's bound to a non-nullable database field so that it is populated on initialization with all possible values. And it's working fine in that regard. ...
If you bind to a view-model property that is a nullable double (or int) how do you allow a user to specify nothing. I'm looked into validation but I can't see how I could get that to help. It seems like if a textbox is blanked out WPF sees it as an empty string and then doesn't put the into the vm proptery. So 2 ways around it I ca...
Im trying to set up a form where a user has to pick an option from a select or enter a value in an input. One must be required but not both. I was attempting to write an if else statement if the state is selected then remove the class on province, if province is filled then remove class on state $("#state").bind('change' , function() {...
I've got the following View <% Using Html.BeginForm()%> <%: Html.ValidationSummary(True) %> <div class="displayright"> <h3> <%: Html.LabelFor(Function(model) model.About) %></h3> <noscript> <h3> Please use <%: Html.ActionLink("Markdown", "Markdow...
I have a user sign-up form with a registration code field (:reg_code). I have a list of valid registration codes (in a yml file, but doesn't have to be if that makes things easier). I need to check if the user enters in a valid code in the reg code field. I'm a rails/ruby newbie and have NO CLUE how to load & parse the file to check t...
The following validation works fine on both client side and server side <DisplayName("website")> _ <StringLength(256, ErrorMessage:="Web Address cannot exceed 256 characters.")> _ <RegularExpression("^http(s?)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$", ErrorMessage:="Not a valid website address")> _ Public Property Web...
I'm using Enterprise library Validation application block. abstract Class A { public int fieldA; } class B:A { } I add validators to type B. I'm not able to find the field fieldA and also even if I enter it in configuration, the validation does not succeed. Does VAB not take the abstract class and inherited properties or fields into...
Hey, I have some very simple code below that I can't get to validate on http://validator.w3.org/check and the errors make little sense to me. I'm stumped here can anyone see/understand the issue(s)? Code: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobileallianc...
Hi guys, I'm developing an application where I have a login screen. I'd like to have the user credentials stored in a MySQL database. I have a database created with id, username and password fields. I can run a select statement and the console shows the results. I was wondering how would I go about making a login screen with usernam...
Hi guys. I have been given the task to apply regular expressions on a form validation which I have achieved (using jquery.validate.js). Now, I have to apply a type of regular expressions when the select tag is pointed to US and other type of regular expressions when is pointed to any other country. Any help will be fully appreciated. Tha...
I'm trying figure out the best way to validate user input and I've been looking at ValidationRule and IDataErrorInfo. I have a VM and a model and I want to ensure a user does not enter alpha char's into multiple textbox's bound to doubles (or ints). I'm running into 3 issues 1) When I use the ValidationRule the method returns a 'Valid...
I want to bind Validation.HasError to a boolean property on my viewmodel. I only want to know when there is a validation error so that I can disable my buttons on my VM using canexecute methods from my relay commands. I get this error though: 'Validation.HasError' property is read-only and cannot be set from markup. I have tried diff...
This event belongs to form view protected void companyForm_ItemInserting(object sender, FormViewInsertEventArgs e) { some logic } I have some customValidator (server side) i want to know y i dont need to check page.isvalid property in above event... while in some events i have to check it otherwise event code is processed despi...
Hi, I'm trying to validate a system path. This path is valid if it begins with some dirs and don't contain two dots one another. #valid path /home/user/somedir/somedir_2 #evil path /home/user/../somedir_2/ I know how to check for two dots in a path: \.\. or [\.]{2} But I really want to do something like that: /home/user/<match ev...