---
schema_version: "1"
id: 7f6436b09efa414d017a5956ad55d055e289289489651da3e1d3ce2bfef6a7e5
title: Validation When You Save Code Changes
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/cli/validation-on-save.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/validation-on-save.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2617e019f3a282284a5d99d15fd08ae7cf28202eb9003173a49a96474a8e272d
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Validation When You Save Code Changes

Aura component JavaScript code is validated when you save it. Validation ensures that your components are written using best practices and avoid common pitfalls that can make them incompatible with Lightning Locker. Validation happens automatically when you save Aura component resources in the Developer Console, in your favorite IDE, and via API.

Validation failures are treated as errors and block changes from being saved. Error messages explain the failures. Depending on the tool you’re using, these errors are presented in different ways. For example, the Developer Console shows an alert for the first error it encounters (1), and lists all of the validation errors discovered in the **Problems** tab (2).

![Save validation errors in the Developer Console](https://developer.salesforce.com/media/aura-platform/dev_console_save_validations.png)

Validations are applied only to components set to API version 41.0 and later. If the validation service prevents you from saving important changes, set the component version to API 40.0 or earlier to disable validations temporarily. When you’ve corrected the coding errors, return your component to API 41.0 or later to save it with passing validations.

