---
schema_version: "1"
id: 92eab05686bc7879a36f29c037bee3da032c451587c5a7e52291ced985d9ded7
title: Validation Rules and Standard Controllers
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/controller-std/pages-controller-std-validation-rules.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-controller-std-validation-rules.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c0b9761052640f9d0f327d892a5151445d910683afe27d3bc700b575b0392bfe
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Validation Rules and Standard Controllers

If a user enters data on a Visualforce page that uses a standard controller, and that data causes a validation rule error, the error can be displayed on the Visualforce page. If the validation rule error location is a field associated with an `<apex:inputField>` component, the error displays there. If the validation rule error location is set to the top of the page, use the `<apex:pageMessages>` or `<apex:messages>` component within the `<apex:page>` to display the error.

