Module:system.validators.misc

From NoxBot the modular PHP IRC bot

(Redirected from Validator:boolean)
Jump to: navigation, search


Module: system.validators.misc
DeveloperMark Sanders
Namespacesystem.validators
ValidatorsAny

Boolean

Constant

NonEmpty
Copyright2005-2009 Mark Sanders
LicenseGNU GPLv3

Description

This module, command or validator is not properly documented yet. The behavior of the module, command or validator can change or be removed without notice.

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

This module, command or validator is not properly documented yet. The behavior of the module, command or validator can change or be removed without notice.

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

Add a comment

Below you can find comments and annotations added by users.

Comments

No comments added yet. Be the first to add a new comment. Be sure that you understand the guidelines of commenting.

Add a comment

User comments can include false information.

We are not responsble for the content posted by users.

Comments

Useful links for NoxBot users

Documentation home

Live Support

Credits

Licensing

Known bugs

Requested features

Browse through the functionality of NoxBot by

Modules

Commands

Validators

Namespaces

AuthGroups

Developers

Useful links for NoxBot Developers and module writers

Api reference

SVN repository

Trac timeline

Roadmap

Active tickets

Create ticket

Personal tools