https://wiki.alpinelinux.org/w/index.php?title=Validator.lua&feed=atom&action=historyValidator.lua - Revision history2024-03-29T11:15:42ZRevision history for this page on the wikiMediaWiki 1.40.0https://wiki.alpinelinux.org/w/index.php?title=Validator.lua&diff=6899&oldid=prevDubiousjim: Category:Lua2012-03-12T09:07:04Z<p>Category:Lua</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:07, 12 March 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l83">Line 83:</td>
<td colspan="2" class="diff-lineno">Line 83:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> true</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> true</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Lua]]</ins></div></td></tr>
</table>Dubiousjimhttps://wiki.alpinelinux.org/w/index.php?title=Validator.lua&diff=1906&oldid=prevMs13sp at 15:11, 22 November 20072007-11-22T15:11:20Z<p></p>
<p><b>New page</b></p><div>=== is_ipv4 (function) ===<br />
'''INPUT:'''<BR><br />
This library function required the following inputs/parameters.<br />
* String in form of ip address<br />
** Example: 192.168.24.10<br />
'''OUTPUT:'''<BR><br />
This library function deliverers the following output/parameters.<br />
* '''''false''''' or "true"<br />
'''CODING EXAMPLE:'''<br />
-- Include/Call for this library<br />
require("validator")<br />
-- Check if url is a folder<br />
liboutput = validator.is_ip("192.168.24.10")<br />
If the string is a valid ip 'liboutput' would contain string:<br />
true<br />
If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.<br />
<br />
===is_mac (function) ===<br />
'''INPUT:'''<BR><br />
This library function required the following inputs/parameters.<br />
* String in form of mac address<br />
** Example: 00:ca:ba:de:00:12<br />
'''OUTPUT:'''<BR><br />
This library function deliverers the following output/parameters.<br />
* '''''false''''' or "true"<br />
'''CODING EXAMPLE:'''<br />
-- Include/Call for this library<br />
require("validator")<br />
-- Check if url is a folder<br />
liboutput = validator.is_mac("00:ca:ba:de:00:12")<br />
If the string is a valid mac address 'liboutput' would contain string:<br />
true<br />
If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.<br />
<br />
===is_integer(function)===<br />
'''INPUT:'''<BR><br />
This library function required the following inputs/parameters.<br />
* Number<br />
** Example: 100<br />
'''OUTPUT:'''<BR><br />
This library function deliverers the following output/parameters.<br />
* '''''false''''' or "true"<br />
'''CODING EXAMPLE:'''<br />
-- Include/Call for this library<br />
require("validator")<br />
-- Check if url is a folder<br />
liboutput = validator.is_integer("100")<br />
If the string is a valid ip 'liboutput' would contain string:<br />
true<br />
If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.<br />
<br />
===is_integer_in_range (function)===<br />
'''INPUT:'''<BR><br />
This library function required the following inputs/parameters.<br />
* 3 numbers --- number to test, min, max<br />
** Example: (10,5,12)<br />
'''OUTPUT:'''<BR><br />
This library function deliverers the following output/parameters.<br />
* '''''false''''' or "true"<br />
'''CODING EXAMPLE:'''<br />
-- Include/Call for this library<br />
require("validator")<br />
-- Check if url is a folder<br />
liboutput = validator.is_integer_in_range(10,5,15)<br />
If the string is a valid ip 'liboutput' would contain string:<br />
true<br />
If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.<br />
<br />
===is_port (function)===<br />
'''INPUT:'''<BR><br />
This library function required the following inputs/parameters.<br />
* Number - is it between 1 and 65535<br />
** Example: 45<br />
'''OUTPUT:'''<BR><br />
This library function deliverers the following output/parameters.<br />
* '''''false''''' or "true"<br />
'''CODING EXAMPLE:'''<br />
-- Include/Call for this library<br />
require("validator")<br />
-- Check if url is a folder<br />
liboutput = validator.is_port("45")<br />
If the string is a valid ip 'liboutput' would contain string:<br />
true<br />
If the string is missing or an invalid ip 'liboutput' would contain '''''false'''''.</div>Ms13sp