---
pagination_next: null
description: Summary of the "Block validation and warnings" codelab.
---

# Block validation and warnings

## 5. Summary

In this codelab, you learned:

- How to use the field validators in Blockly's JSON API.
- How to create an extension that adds functionality to a block.
- How to create custom field validators.
- How to validate the entire block when any part of it changes.
- How to display a warning message on the block.
- How to disable a block (without adding an event to the undo history).

You can find the code for the [completed custom block](https://github.com/RaspberryPiFoundation/blockly/docs/docs/codelabs/validation-and-warnings/complete-code/index.js) on GitHub.

### Resources

For more information related topics, check out the documentation:

- [Defining the toolbox](/guides/configure/toolboxes/toolbox)
- [Defining custom blocks](/guides/create-custom-blocks/overview)
- [Generating code from blocks](/guides/create-custom-blocks/code-generation/overview)
- [Creating extensions](/guides/create-custom-blocks/define/extensions#extensions)
- [Listening for change events](/guides/configure/events)
- [Custom validators](/guides/create-custom-blocks/fields/validators)
- [Custom block style guide](/guides/design/blocks)
