Module:system.validators.misc
From NoxBot the modular PHP IRC bot
| Module: system.validators.misc | |
|---|---|
| Developer | Mark Sanders |
| Namespace | system.validators |
| Validators | Any NonEmpty |
| Copyright | 2005-2009 Mark Sanders |
| License | GNU GPLv3 |
Description
Validators
Any
Everything matches this validator. One could also say this validator is not a validator since it does not validate the input at all. It just validates everything as valid.
You could use this as a catch all to catch the rest of the argument like:
'stringany:any:namedarg'
Or if you want it as an array:
'any:any:namedargarray'
This will capture all the remaining arguments.
If you use this validator keep in mind that it always returns true. This means that even if you make the modifier of types: "required", "many" or "stringmany" it will behave like the modifier types: "optional", "any", "stringany" respectivly.
It is highly unlikely you will need this validator at all. Usually the nonempty validator is better since the modifiers work as expected on the nonempty validator.
Boolean
This validator check if the provided argument could be a boolean and if so what its value would be.
The following is seen as boolean true:
any number above 0 on true enable enabled
The following is seen as boolean false:
0 and any number below 0 off false disable disabled
Constant
NonEmpty
Everything matches this validator as long as it has atleast one character.
You could use this as a catch all to catch the rest of the argument like:
'stringany:nonempty:namedarg'
Or if you want it as an array:
'any:nonempty:namedargarray'
This will capture all the remaining arguments that are not empty.
Copyright and License
Copyright (C) 2005-2009 Mark Sanders
License: GNU GPLv3
User comments
|
Below you can find comments and annotations added by users. |
|
User comments can include false information. We are not responsble for the content posted by users. |
|
Useful links for NoxBot users | |||||
|
Browse through the functionality of NoxBot by | |||||
|
Useful links for NoxBot Developers and module writers | |||||

