public ValidationOptions DeserialiseValidationOptions(XmlNode validationNode) { var options = new ValidationOptions(); var proc = new NodeProcessor(validationNode); options.NotEmpty = proc.GetNullable <bool>("NotEmpty"); options.Nullable = proc.GetNullable <bool>("Nullable"); options.MaximumValue = proc.GetNullable <int>("MaximumValue"); options.MinimumValue = proc.GetNullable <int>("MinimumValue"); options.FutureDate = proc.GetNullable <bool>("FutureDate"); options.PastDate = proc.GetNullable <bool>("PastDate"); options.FractionalDigits = proc.GetNullable <int>("FractionalDigits"); options.IntegerDigits = proc.GetNullable <int>("IntegerDigits"); options.MaximumLength = proc.GetNullable <long>("MaximumLength"); options.MinimumLength = proc.GetNullable <int>("MinimumLength"); options.RegexPattern = proc.GetString("RegexPattern", null); options.Validate = proc.Exists("Validate"); return(options); }