<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/kwalify/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/kwalify/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 23 Sep 2014 13:08:27 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/kwalify/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/kwalify/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="disjunctional-pattern-matching-with-kwalify"&gt;Disjunctional pattern matching with Kwalify&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Evert Mouw, 2014-09-23&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="the-first-space"&gt;The first space&lt;/h2&gt;
&lt;p&gt;The first space after the colon is &lt;em&gt;needed&lt;/em&gt; and also will be &lt;em&gt;ignored&lt;/em&gt; for the pattern matching.&lt;/p&gt;
&lt;p&gt;So this key-value pair will not be recognized:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;red&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;But this one will work normally:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;red&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The key is "color" and the value is "red" (&lt;em&gt;without&lt;/em&gt; the space).&lt;/p&gt;
&lt;h2 id="enum-doesnt-work-for-optional-values"&gt;Enum doesn't work for optional values&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;enum&lt;/code&gt; operator does not validate empty values, even when the field is not required. This is a &lt;a class="" href="https://sourceforge.net/p/kwalify/bugs/21"&gt;bug&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="regexp-matching-that-doesnt-work"&gt;RegExp matching that doesn't work&lt;/h2&gt;
&lt;p&gt;If you want to only validate a value when the whole value matches your pattern, and not only a part of it, then you need to pay close attention.&lt;/p&gt;
&lt;p&gt;E.g., you want to match "ant" or "dinosaur" or "dino" or "ant, dino" or "ant, dinosaur" or "ant, dino*" ...&lt;/p&gt;
&lt;p&gt;You specify this pattern in schema.yaml:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nl"&gt;pattern:&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;ant&lt;/span&gt;&lt;span class="p"&gt;,[&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;elek&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="o"&gt;*|&lt;/span&gt;&lt;span class="n"&gt;ant&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;dinosaur&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;dino&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then this will be validated, because a &lt;em&gt;part&lt;/em&gt; of it matches!&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;producten&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ank&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dinosaur&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;But this one will not be validated, because no part matches:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;producten&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ank&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="working-whole-value-pattern-matching"&gt;Working whole value pattern matching&lt;/h2&gt;
&lt;p&gt;You need to make sure that the whole value, including the beginning (^) and the end ($), are matched.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nl"&gt;pattern:&lt;/span&gt; &lt;span class="o"&gt;/^&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;|^&lt;/span&gt;&lt;span class="n"&gt;ant&lt;/span&gt;&lt;span class="p"&gt;,[&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;dino&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;|^&lt;/span&gt;&lt;span class="n"&gt;ant&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;|^&lt;/span&gt;&lt;span class="n"&gt;dinosaur&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;|^&lt;/span&gt;&lt;span class="n"&gt;elek&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This works as expected.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Evert Mouw</dc:creator><pubDate>Tue, 23 Sep 2014 13:08:27 -0000</pubDate><guid>https://sourceforge.netea47164e44e2fd687181d02422a7c2c99c80d2ec</guid></item><item><title>Home modified by Kuwata Makoto</title><link>https://sourceforge.net/p/kwalify/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/kwalify/wiki/markdown_syntax/"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="/u/kwatch/"&gt;Kuwata Makoto&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;span class="download-button-516c50f85fcbc979b97df01d" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kuwata Makoto</dc:creator><pubDate>Mon, 15 Apr 2013 19:11:53 -0000</pubDate><guid>https://sourceforge.net29d3e3abd263d2cd9041d1f116af2fca231aab52</guid></item></channel></rss>