Template:Valid: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Hut 8.5 {{pp-template|small=yes}} |
meta>Drilnoth m typo |
||
Line 2: | Line 2: | ||
{{pp-template|small=yes}} | {{pp-template|small=yes}} | ||
==Purpose== | ==Purpose== | ||
Determines whether something is valid in a | Determines whether something is valid in a certain context. Currently only implemented for determining if a number is within the precision that wikipedia expressions can handle. | ||
==Returns== | ==Returns== | ||
'''true''' if the argument is valid, '''false''' if it is not. | '''true''' if the argument is valid, '''false''' if it is not. |
Revision as of 01:58, 6 October 2009
Purpose
Determines whether something is valid in a certain context. Currently only implemented for determining if a number is within the precision that wikipedia expressions can handle.
Returns
true if the argument is valid, false if it is not.
Examples
{{valid|number=A}}
= false (not a number){{valid|number=1234}}
= true{{valid|number=+1234}}
= true{{valid|number=-1234}}
= true{{valid|number=(1234)}}
= true (one pair of parenthesis is allowed){{valid|number=--1234}}
= false (incorrect sign use){{valid|number=1234567890}}
= true{{valid|number=12345678901234567890}}
= false (too large){{valid|number=1.234567890}}
= true{{valid|number=1.2345678901234567890}}
= false (too many decimals)