Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
0
Share

NumericValidator

Validator class

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

Usage: Let validator = IntValidator(), then * validator.validate('3') -> 3 * validator.validate(3) -> 3) * validator.validate(3.0) -> 3 * validator.validate('false') -> ValueError * validator.validate('true') -> ValueError * validator.validate('foo') -> ValueError

Functions
__init__

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

type_ : type - <class 'float'>
min_value : float - -inf
max_value : float - inf
include_min : bool - False
include_max : bool - False
allowed_values : list
set_type
type_ : Union
validate

Valitates a value.

value : Union
The value to validate
Return type : Any
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.