Home

validate.BytesRules

Example

Disclaimer: The example is meant to show what methods are available on the object and does not necessarily constitute working code.
local types = import 'types.libsonnet';

types.validate.BytesRules
.withConst('c3RyaW5n')
.withContains('c3RyaW5n')
.withIgnoreEmpty(false)
.withIn([ 'c3RyaW5n' ])
.withIp(false)
.withIpv4(false)
.withIpv6(false)
.withLen(1)
.withMaxLen(1)
.withMinLen(1)
.withNotIn([ 'c3RyaW5n' ])
.withPattern('string')
.withPrefix('c3RyaW5n')
.withSuffix('c3RyaW5n')
._validate()

Fields

Name Type One-of group Required Constraints
const bytes  
contains bytes  
ignore_empty bool  
in [] bytes  
ip bool well_known  
ipv4 bool well_known  
ipv6 bool well_known  
len uint64  
max_len uint64  
min_len uint64  
not_in [] bytes  
pattern string  
prefix bytes  
suffix bytes