validate module
Maylang standard-library module.
import "validate" as validate;
Functions
validate_nonempty
fun validate_nonempty(s: Any) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_in_range
fun validate_in_range(x: Any, lo: Float, hi: Float) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_email
fun validate_email(s: Str) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_url
fun validate_url(s: Str) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_all
fun validate_all(value: Any, rules: List<ValidationRule>) -> ValidationNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_required_fields
fun validate_required_fields(value: Map<Str, Any>, fields: List<Str>) -> RequiredFieldsNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_int_string
fun validate_int_string(s: Any) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
validate_float_string
fun validate_float_string(s: Any) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
Types
ValidationRule
struct ValidationRule { check: (Any) -> Bool, message: Str }No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
Validation
struct Validation { ok: Bool, errors: List<Str>, value: Any }No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
RequiredFields
struct RequiredFields { ok: Bool, missing: List<Str> }No description yet. Read the declaration source for the exact contract.
supported · full runtime · source