aurelia/aurelia

View on GitHub
docs/images/validation/seq-define-rules.svg

Summary

Maintainability
Test Coverage
<svg id="mermaid-1585176834858" width="100%" xmlns="http://www.w3.org/2000/svg" height="100%" style="max-width:721.203125px;" viewBox="-50 -10 721.203125 463"><style>#mermaid-1585176834858 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}#mermaid-1585176834858 .label text{fill:#333}#mermaid-1585176834858 .node rect,#mermaid-1585176834858 .node circle,#mermaid-1585176834858 .node ellipse,#mermaid-1585176834858 .node polygon{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-1585176834858 .node .label{text-align:center}#mermaid-1585176834858 .node.clickable{cursor:pointer}#mermaid-1585176834858 .arrowheadPath{fill:#333}#mermaid-1585176834858 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-1585176834858 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-1585176834858 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-1585176834858 .cluster text{fill:#333}#mermaid-1585176834858 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-1585176834858 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-1585176834858 text.actor{fill:#000;stroke:none}#mermaid-1585176834858 .actor-line{stroke:grey}#mermaid-1585176834858 .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#mermaid-1585176834858 .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#mermaid-1585176834858 #arrowhead{fill:#333}#mermaid-1585176834858 .sequenceNumber{fill:#fff}#mermaid-1585176834858 #sequencenumber{fill:#333}#mermaid-1585176834858 #crosshead path{fill:#333 !important;stroke:#333 !important}#mermaid-1585176834858 .messageText{fill:#333;stroke:none}#mermaid-1585176834858 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-1585176834858 .labelText{fill:#000;stroke:none}#mermaid-1585176834858 .loopText{fill:#000;stroke:none}#mermaid-1585176834858 .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#ccf}#mermaid-1585176834858 .note{stroke:#aa3;fill:#fff5ad}#mermaid-1585176834858 .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}#mermaid-1585176834858 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-1585176834858 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-1585176834858 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-1585176834858 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .section{stroke:none;opacity:0.2}#mermaid-1585176834858 .section0{fill:rgba(102,102,255,0.49)}#mermaid-1585176834858 .section2{fill:#fff400}#mermaid-1585176834858 .section1,#mermaid-1585176834858 .section3{fill:#fff;opacity:0.2}#mermaid-1585176834858 .sectionTitle0{fill:#333}#mermaid-1585176834858 .sectionTitle1{fill:#333}#mermaid-1585176834858 .sectionTitle2{fill:#333}#mermaid-1585176834858 .sectionTitle3{fill:#333}#mermaid-1585176834858 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .grid .tick{stroke:#d3d3d3;opacity:0.3;shape-rendering:crispEdges}#mermaid-1585176834858 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .grid path{stroke-width:0}#mermaid-1585176834858 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-1585176834858 .task{stroke-width:2}#mermaid-1585176834858 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .taskText:not([font-size]){font-size:11px}#mermaid-1585176834858 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-1585176834858 .task.clickable{cursor:pointer}#mermaid-1585176834858 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-1585176834858 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-1585176834858 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-1585176834858 .taskText0,#mermaid-1585176834858 .taskText1,#mermaid-1585176834858 .taskText2,#mermaid-1585176834858 .taskText3{fill:#fff}#mermaid-1585176834858 .task0,#mermaid-1585176834858 .task1,#mermaid-1585176834858 .task2,#mermaid-1585176834858 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-1585176834858 .taskTextOutside0,#mermaid-1585176834858 .taskTextOutside2{fill:#000}#mermaid-1585176834858 .taskTextOutside1,#mermaid-1585176834858 .taskTextOutside3{fill:#000}#mermaid-1585176834858 .active0,#mermaid-1585176834858 .active1,#mermaid-1585176834858 .active2,#mermaid-1585176834858 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-1585176834858 .activeText0,#mermaid-1585176834858 .activeText1,#mermaid-1585176834858 .activeText2,#mermaid-1585176834858 .activeText3{fill:#000 !important}#mermaid-1585176834858 .done0,#mermaid-1585176834858 .done1,#mermaid-1585176834858 .done2,#mermaid-1585176834858 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-1585176834858 .doneText0,#mermaid-1585176834858 .doneText1,#mermaid-1585176834858 .doneText2,#mermaid-1585176834858 .doneText3{fill:#000 !important}#mermaid-1585176834858 .crit0,#mermaid-1585176834858 .crit1,#mermaid-1585176834858 .crit2,#mermaid-1585176834858 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-1585176834858 .activeCrit0,#mermaid-1585176834858 .activeCrit1,#mermaid-1585176834858 .activeCrit2,#mermaid-1585176834858 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-1585176834858 .doneCrit0,#mermaid-1585176834858 .doneCrit1,#mermaid-1585176834858 .doneCrit2,#mermaid-1585176834858 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-1585176834858 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-1585176834858 .milestoneText{font-style:italic}#mermaid-1585176834858 .doneCritText0,#mermaid-1585176834858 .doneCritText1,#mermaid-1585176834858 .doneCritText2,#mermaid-1585176834858 .doneCritText3{fill:#000 !important}#mermaid-1585176834858 .activeCritText0,#mermaid-1585176834858 .activeCritText1,#mermaid-1585176834858 .activeCritText2,#mermaid-1585176834858 .activeCritText3{fill:#000 !important}#mermaid-1585176834858 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-1585176834858 g.classGroup text .title{font-weight:bolder}#mermaid-1585176834858 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-1585176834858 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-1585176834858 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-1585176834858 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-1585176834858 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-1585176834858 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-1585176834858 .commit-id,#mermaid-1585176834858 .commit-msg,#mermaid-1585176834858 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-1585176834858 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px}#mermaid-1585176834858 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-1585176834858 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-1585176834858 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-1585176834858 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-1585176834858 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-1585176834858 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-1585176834858 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-1585176834858 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-1585176834858 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}</style><style>#mermaid-1585176834858 {
    color: rgb(0, 0, 0);
    font: 16px "trebuchet ms", verdana, arial;
  }</style><g></g><g><line id="actor0" x1="75" y1="5" x2="75" y2="452" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px;"><tspan x="75" dy="0">ViewModel</tspan></text></g><g><line id="actor1" x1="275" y1="5" x2="275" y2="452" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="200" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="275" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px;"><tspan x="275" dy="0">ValidationRules</tspan></text></g><g><line id="actor2" x1="475" y1="5" x2="475" y2="452" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="400" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="475" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px;"><tspan x="475" dy="0">RulesRegistry</tspan></text></g><defs><marker id="arrowhead" refX="5" refY="2" markerWidth="6" markerHeight="4" orient="auto"><path d="M 0,0 V 4 L6,2 Z"></path></marker></defs><defs><marker id="crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="16" refY="4"><path fill="black" stroke="#000000" stroke-width="1px" d="M 9,2 V 6 L16,4 Z" style="stroke-dasharray: 0, 0;"></path><path fill="none" stroke="#000000" stroke-width="1px" d="M 0,1 L 6,7 M 6,1 L 0,7" style="stroke-dasharray: 0, 0;"></path></marker></defs><defs><marker id="sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"><circle cx="15" cy="15" r="6"></circle></marker></defs><g><text x="175" y="93" class="messageText" style="text-anchor: middle;">Start defining validation rules on target</text><line x1="75" y1="100" x2="275" y2="100" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><text x="375" y="128" class="messageText" style="text-anchor: middle;">Set validation rules on target</text><line x1="275" y1="135" x2="475" y2="135" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><text x="475" y="163" class="messageText" style="text-anchor: middle;">Set rules metadata annotation on object</text><path d="M 475,170 C 535,160 535,200 475,190" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></path></g><g><text x="175" y="228" class="messageText" style="text-anchor: middle;">Handle to define further rules</text><line x1="275" y1="235" x2="75" y2="235" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><text x="175" y="263" class="messageText" style="text-anchor: middle;">Define rule on property 'x'</text><line x1="75" y1="270" x2="275" y2="270" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><text x="175" y="298" class="messageText" style="text-anchor: middle;">PropertyRule instance for `x`with a collection of rules</text><line x1="275" y1="305" x2="75" y2="305" class="messageLine0" stroke-width="2" stroke="black" marker-end="url(#arrowhead)" style="fill: none;"></line></g><g><rect x="50" y="315" fill="#EDF2AE" stroke="#666" width="250" height="52" rx="0" ry="0" class="note"></rect><text x="46" y="339" class="noteText"><tspan x="66">Further rules and customizations</tspan></text><text x="46" y="355" class="noteText"><tspan x="66">definition.</tspan></text></g><g><rect x="0" y="387" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="419.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px;"><tspan x="75" dy="0">ViewModel</tspan></text></g><g><rect x="200" y="387" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="275" y="419.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px;"><tspan x="275" dy="0">ValidationRules</tspan></text></g><g><rect x="400" y="387" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="475" y="419.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px;"><tspan x="475" dy="0">RulesRegistry</tspan></text></g></svg>