|
Drag[en]gine Script Module DragonScript 1.32.1
|
Simple text validator ensure maximum text length and used characters. More...
Classes | |
| enum | CharacterClass |
| Character classes. More... | |
Public Member Functions | |
| CharacterClass | getCharacterClass () |
| Character class to accept. | |
| int | getMaxCharCount () |
| Maximum number of characters allowed. | |
| SimpleTextValidator | new (int maxCharCount, CharacterClass characterClass) |
| Create simple text validator. | |
| bool | validates (String text) |
| Text is valid. | |
Simple text validator ensure maximum text length and used characters.
Accepts string only if the length does not exceeded a maximum number and all characters in the string match a specific set of characters. A few basic character sets are provided which are often required.
Once created the text validator is immutable.
| CharacterClass Dragengine.Gui.SimpleTextValidator.getCharacterClass | ( | ) |
Character class to accept.
| int Dragengine.Gui.SimpleTextValidator.getMaxCharCount | ( | ) |
Maximum number of characters allowed.
| SimpleTextValidator Dragengine.Gui.SimpleTextValidator.new | ( | int | maxCharCount, |
| CharacterClass | characterClass | ||
| ) |
Create simple text validator.
| maxCharCount | Maximum number of characters to allow. |
| characterClass | Character class to allow. |
| EInvalidParam | maxCharCount is less than 1. |
| bool Dragengine.Gui.SimpleTextValidator.validates | ( | String | text | ) |
Text is valid.
Implements Dragengine.Gui.TextValidator.