Assert all touched
assertAllTouched() on a document, section or fieldset to ensure that no
data has been left untouched by your application.
const document = enolib.parse('importan_option: no_delete'); // Note the mis-typed key const importantOption = document.field('important_option').optionalStringValue(); document.assertAllTouched();
When you run this code an error will be thrown in the last line:
This element was not expected, make sure it is at the right place in the document and that its key is not mis-typed. Line | Content > 1 | importan_option: no_delete
Next page: Manual touching