Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!
Template:IsValidClassAndLevelList
Jump to navigation
Jump to search
Purpose[edit]
- Determine whether supplied value is a valid comma separated list of class abbreviation [with an optional level as second word] elements
- Template accepts one argument, checks each string segment for valid class [and level] combination, where string segment is determined by comma
- Had to split validation template to a different template, as mediawiki spits back template loot error when attempting to use a recursive template
- Returns 0 on failue, or 1 on success
Usage[edit]
{{IsValidClassAndLevelList | = default : <empty> (will return 0) // First argument is the value to use in conditional expression }}
Examples[edit]
code | result |
---|---|
{{IsValidClassAndLevelList}} | 0 |
{{IsValidClassAndLevelList|}} | 0 |
{{IsValidClassAndLevelList|Bad}} | 0 |
{{IsValidClassAndLevelList|Art}} | 1 |
{{IsValidClassAndLevelList|Art Art}} | 0 |
{{IsValidClassAndLevelList|Art 0}} | 0 |
{{IsValidClassAndLevelList|Art 6}} | 1 |
{{IsValidClassAndLevelList|Art 6, Wiz 1}} | 1 |
{{IsValidClassAndLevelList|Art 6, Wiz 0}} | 0 |
Categorization[edit]
Coding[edit]
0