Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes. edit
Thank you for your patience while we continue to upgrade DDOwiki to the latest MediaWiki LTS version. If you find any errors on the site, please visit the Discord chat server and let us know.
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 remove ads, build a reputation, and unlock more editing privileges and then visit DDO wiki's IRC Chat/Discord if you need any help!
Template:IsValidClassAndLevelList
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