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 mechanicsNewbie guideIn developmentDDO StoreSocial Media


ChallengesClassesCollectablesCraftingEnhancementsEpic DestiniesFavorFeats

GlossaryItemsMapsMonstersPlacesQuestsRacesReincarnationSkillsSpells


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

From DDO wiki
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