Single mandatory field
Mandatory field with regex validator
validate {
mobile { regex ~/[0-9]{5}/ }
}
Mandatory field with value validator
validate {
product { values "product1", "product2", "product3"}
}
Mandatory nested fields
validate {
firstname
lastname
address {
street
city
state
zip
}
}