26 - Type and Empty Abbreviations
by steen_hansen
HTML
<!DOCTYPE html><meta charset="utf-8" />
<title>26 Type and Empty Abbreviations</title>
<div id='js-div' style="width:50%;">
<a href='https://github.com/steenhansen/type-czech' target="_blank" class='git-hub'>GitHub Package</a>
<div id='js-code'>the javascript</div>
</div>
<div id="the-explanation" style="width:50%">
<div class='an-explantion'>26 - Empty Abbreviations</div>
<div id='explanation-text'>
<br>
Abbreviations can be used to make empty assertions shorter.
<div>
<div style="float:left; width:25%">
<li style="list-style: none;"><b>Empty Shortcuts</b></li>
</div>
<div style="float:left; width:25%">
<ul>
<li>'<b>OK</b>' <br> 'EMPTY-OK'</li>
</ul>
</div>
<div style="float:left; width:25%">
<ul>
<li>'<b>ER</b>' <br> 'EMPTY-ERROR'</li>
</ul>
</div>
<div style="float:left; width:25%">
<ul>
<li>'<b>IG</b>' <br> 'EMPTY-IGNORE'</li>
</ul>
</div>
</div>
<br>
The PRE_check_Person() function ensures that f_name and b_date object fields
must not be empty; a string and date. The key l_name can be blank without problem
as its empty designation is 'OK'.
<br><br>
After which the POST_check_Person() function certifies that the Person result
array has a non-blank string as the first element, followed by a non-checked value.
A valueless birth date is allowed.
<br><br>
The errors:
<ul>
<li>Queen Boudica does not have a valid birth date for PRE check, but this is OK on POST check</li>
<li>Madonna has no last name which causes an error in POST_check_Person()</li>
</ul>
</div>
<div id="console-log" >
<div class='a-title'>Console Output</div>
<div id='log-text'></div>
<br>
<!-- ------------TYPE 1------------------------------ -->
<script...