ducky/web

Paddy 2015-05-31 Parent:99a43a6d1d30

6:a641906b8267 Go to Latest

ducky/web/src/components/cog.svg

Enable catch-all in our ValidationError component. We're doing this an ugly, hacky way. But it works, and right now, that's what counts. To match our params/fields/headers properties on the ValidationError component, we're going to add the notParams/notFields/notHeaders properties--they match any error _not_ targeting those params/fields/headers. Basically, "any error that wouldn't be caught by these filters". Which is an ugly, but workable, solution for a catch-all ValidationError--just tell it to catch anything but the params/fields/headers that are being handled by the other ValidationErrors. Our implementation of this in the RegisterPage component validates (ha!) that it's at least workable model, if not overly pretty. Also, I anticipate some human error bugs in the future, where one of the field-specific ValidationErrors gets updated and the catch-all ValidationError does not. But whatever. For now, this is Good Enoughâ„¢.

History
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <svg
3 xmlns:dc="http://purl.org/dc/elements/1.1/"
4 xmlns:cc="http://creativecommons.org/ns#"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:svg="http://www.w3.org/2000/svg"
7 xmlns="http://www.w3.org/2000/svg"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 width="8"
11 height="8"
12 viewBox="0 0 8 8"
13 id="svg2"
14 version="1.1"
15 inkscape:version="0.48.2 r9819"
16 sodipodi:docname="cog.svg">
17 <metadata
18 id="metadata10">
19 <rdf:RDF>
20 <cc:Work
21 rdf:about="">
22 <dc:format>image/svg+xml</dc:format>
23 <dc:type
24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25 </cc:Work>
26 </rdf:RDF>
27 </metadata>
28 <defs
29 id="defs8" />
30 <sodipodi:namedview
31 pagecolor="#ffffff"
32 bordercolor="#666666"
33 borderopacity="1"
34 objecttolerance="10"
35 gridtolerance="10"
36 guidetolerance="10"
37 inkscape:pageopacity="0"
38 inkscape:pageshadow="2"
39 inkscape:window-width="640"
40 inkscape:window-height="480"
41 id="namedview6"
42 showgrid="false"
43 inkscape:zoom="29.5"
44 inkscape:cx="4"
45 inkscape:cy="4"
46 inkscape:window-x="0"
47 inkscape:window-y="0"
48 inkscape:window-maximized="0"
49 inkscape:current-layer="svg2" />
50 <path
51 d="M3.5 0l-.5 1.19c-.1.03-.19.08-.28.13l-1.19-.5-.72.72.5 1.19c-.05.1-.09.18-.13.28l-1.19.5v1l1.19.5c.04.1.08.18.13.28l-.5 1.19.72.72 1.19-.5c.09.04.18.09.28.13l.5 1.19h1l.5-1.19c.09-.04.19-.08.28-.13l1.19.5.72-.72-.5-1.19c.04-.09.09-.19.13-.28l1.19-.5v-1l-1.19-.5c-.03-.09-.08-.19-.13-.28l.5-1.19-.72-.72-1.19.5c-.09-.04-.19-.09-.28-.13l-.5-1.19h-1zm.5 2.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z"
52 id="path4"
53 style="fill:#ececec" />
54 </svg>