validatetermsfortraining module

class validatetermsfortraining.ValidateTermsForTrainingResource

Bases: Resource

methods: ClassVar[Optional[Collection[str]]] = {'POST'}

The methods this view is registered for. Uses the same default (["GET", "HEAD", "OPTIONS"]) as route and add_url_rule by default.

post()

used in the frontend to validate input. things like number of characters, etc.

Parameters:

new_vocabulary (list) – strings that will get added to a vocabulary, at all

Returns:

errors – errors if any, otherwise length of zero

Return type:

list

Examples

{

“new_vocabulary”:[“Bacteria”,”Azorhizobium”]

}