
functions
files
intro
|
|
yast2 |
modules/TypeRepository.ycp |
Type repository for validation of user-defined types
Author: Stanislav Visnovsky
|
|
|
Imports
- Address
- Hostname
- IP
- Netmask
- URL
Global Functions
Local Functions
|
|
|
global is_a (any value, string type) -> boolean
|
|
Validate, that the given value is of given type.
- Parameters:
value |
value to be validated |
type |
type against which to validate |
- Return value:
|
true, if the value can be considered to be of a given type |
local is_string (any s) -> boolean
|
|
Check, if s is a string.
- Parameters:
s |
a value to be validated |
- Return value:
global TypeRepository () -> void
|
|
Constructor, defines the known types.
global regex_validator (string regex, string value) -> boolean
|
|
Generic regular expression validator.
- Parameters:
regex |
the regular expression to be matched |
value |
the value to be matched |
- Return value:
global enum_validator (list values, string value) -> boolean
|
|
Generic enumerated type validator.
- Parameters:
values |
a list of possible values |
value |
the value to be matched |
- Return value:
|