message-event-channel connection
JSON Schema of the field
message-event-channel connection
JSON Schema of the field
Check if your value is valid
The value you wish to test
Gives the current validity of the field returns a boolean
const isValid = await sdk.field.isValid()
console.log(isValid) // false
Reset the value to the previously loaded state
const resetValue = await sdk.field.reset()
// will be empty content or last saved content
console.log(resetValue)
Change the value of the field
The new value you want to set on the field
try {
await sdk.field.setValue({ propertyName1: 'hello world' })
} catch(errors) {
// failed to set value returns error report
}
Check the validation of your value. Returns an array containing any JSON Schema errors found.
The value you whish to test
If you want to validate a field model and get back an error reports ErrorReport
const errors = await sdk.field.validate();
if (errors && errors.length) {
errors.forEach(error => console.log(error));
} else {
// valid
}
Generated using TypeDoc
Allows you to perform actions on the field that is being edited.