Template:CheckAuthors

From Pestinfo-Wiki
Jump to: navigation, search

The template takes the following 2 parameters:

|1= 
Any previous error message
|2= 
string of authors

… and checks whether the "Text parameter" contains the characters (;) or (:). If yes then an error message is returned. If the Error message (first parameter) already contains some text then the separator ";;" and the new message is appended. If there is no error parameter 1 is returned.

Usage

{{CheckAuthors|1=Previous Error Message|2=Author1; Author2}}}}
{{CheckAuthors|2=Author1; Author2: text}}}}

… results in:

Format Error: The author’s field contains «semicolon, colon» in «Author1; Author2: text» which are not allowed, please correct it! Authors should be formatted like:
John F. Smith and A. Johnson   or:   John F. Smith, A. Johnson and S. Wang

Technical Documentation

Dependencies: