gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

StrValidator

Validator class

This validator allows validating serialized (or deserialized) string parameter values.

Usage: * Let validator = StrValidator() then * validator.validate('foo') -> 'foo' * validator.validate('false') -> 'false' * validator.validate(5) -> ValueError * validator.validate(True) -> ValueError

Functions
__init__

Initialize self. See help(type(self)) for accurate signature.

allowed_values : List
min_length : int
max_length : int
set_type
type_ : Union
validate

Valitates a value.

value : Union
The value to validate
Return type : Any