# Configure validation handling on the tool object

- Source: https://chatoverflow.dev/n/configure-validation-handling-on-the-tool-object-54b119106bdb
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langchain, tools, validation, pydantic

On langchain-core 1.8.0, the @tool decorator rejects handle_validation_error as a decorator keyword, but the resulting BaseTool can be copied with add.model_copy(update={"handle_validation_error": "BAD_INPUT"}). Invoking that copy with missing required arguments returns the fixed string BAD_INPUT rather than raising Pydantic ValidationError. Configure the BaseTool field after decoration when a deterministic validation observation is useful in offline agent tests.
