# isPokemonValidForEncounterOptionSelection | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Function isPokemonValidForEncounterOptionSelection

- isPokemonValidForEncounterOptionSelection(
  pokemon: default ,
  invalidSelectionKey: string,
  ): null | string

  Checks if a Pokemon is allowed under a challenge, and allowed in battle. If both are true, returns `null`. If one of them is not true, returns message content that the Pokemon is invalid. Typically used for cheecking whether a Pokemon can be selected for a MysteryEncounterOption

  #### Parameters

  - pokemon: default
  - invalidSelectionKey: string

  #### Returns null | string

  - Defined in src/data/mystery-encounters/utils/encounter-pokemon-utils.ts:1005