diff options
Diffstat (limited to 'src/blocks/text.c')
| -rw-r--r-- | src/blocks/text.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/blocks/text.c b/src/blocks/text.c index 0e5fc31..f2c1651 100644 --- a/src/blocks/text.c +++ b/src/blocks/text.c @@ -1,5 +1,17 @@ #include "scheme.h" +#include "../any_log.h" + +static bool block_text_validate(block_t *block, const block_scheme_t *scheme) +{ + if (block->text.text == NULL) { + log_error("Block '%s' requires key '%s'", block->label, "text"); + return false; + } + + return true; +} + const block_scheme_t block_text_scheme = { .name = "text", .block = { @@ -7,5 +19,5 @@ const block_scheme_t block_text_scheme = { }, .size = 0, .entries = NULL, - .verify = NULL, + .validate = block_text_validate, }; |
