Template:CheckBrackets

From Pestinfo-Wiki
Jump to: navigation, search

The template takes only 1 string parameter and checks whether it contains an opening and closing bracket. If one of these brackets is missing or the parameter is blank it returns a specific error message, e.g.

  • value “4” misses brackets “(…)”
  • missing value

Usage:

{{CheckBrackets|1=24}}
value “24” misses brackets “(…)”
{{CheckBrackets|1=}}
missing value

If value contains the brackets “( )”, no value is returned, i.e. the value is complete as expected:

{{CheckBrackets|1=24 (3)}}