<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Validation on Matt Bolitho</title><link>https://mattbolitho.github.io/tags/validation/</link><description>Recent content in Validation on Matt Bolitho</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><copyright>Matt Bolitho</copyright><lastBuildDate>Mon, 16 Sep 2024 20:00:00 +0000</lastBuildDate><atom:link href="https://mattbolitho.github.io/tags/validation/index.xml" rel="self" type="application/rss+xml"/><item><title>JAL Booking Error: Total length of first name plus last name plus date of birth is too long</title><link>https://mattbolitho.github.io/posts/jal-name-length-error/</link><pubDate>Mon, 16 Sep 2024 20:00:00 +0000</pubDate><guid>https://mattbolitho.github.io/posts/jal-name-length-error/</guid><description>Today my wife and I encountered an error attempting to book flights to Japan on Japan Airlines (JAL). After correctly filling out the passenger details for the desired return journey, we were presented with the following curious error:
Total length of first name plus last name plus date of birth is too long. Please modify your entry and try again. (1160)
We had previously booked directly with JAL on multiple occasions and never had this issue before.</description></item><item><title>Structured Validation Rules in C++</title><link>https://mattbolitho.github.io/posts/structured-validation-rules-in-cpp/</link><pubDate>Sun, 08 Sep 2024 19:00:00 +0000</pubDate><guid>https://mattbolitho.github.io/posts/structured-validation-rules-in-cpp/</guid><description>Validation is a common problem when dealing with any data provided by a user. Even when developing a library, you likely provide custom data types for consuming developers, which are equally (if not more!) untrustworthy.
In a personal project, I was dealing with validating user provided numerical optimization problems. For the sake of brevity in this post, let&amp;rsquo;s assume these problems look like this:
1struct OptimizationProblem 2{ 3 std::vector&amp;lt;double&amp;gt; XLb; 4 std::vector&amp;lt;double&amp;gt; XUb; 5 std::function&amp;lt;double(std::span&amp;lt;double const&amp;gt;)&amp;gt; Eval; 6}; OptimizationProblem contains upper and lower bounds for the primal variables we are optimizing over.</description></item></channel></rss>