# Validation Example

## Introduction

This example describes the usage of the validation framework within the SDK. It demonstrates how to specify constraints for the library meta-model and bind the constraints to the library application context.

## References

Please refer to the document EMF Validation Framework Examples Overview for reviewing the library meta-model used as the basis for demonstrating the capabilities in this example.

## Description

This example plug-in is named `org.eclipse.emf.validation.examples`. This plug-in contributes the Validation menu to the library editor's main menu and context menu. The menu has two items:

1. Enable Live Validation: This actions registers a `EContentAdapter` against the library `Resource` to receive immediate notifications. Within the `notifyChanged` callback the model validation service is called to provide a live validation f the `Notification` object.
2. Validate Elements: This action calls upon the model validation service to provide a batch validation of the selected `EObjects` and their children.

Please refer to the tutorial Validation Tutorial for reviewing the code samples within this example

## Usage

Refer to this example if you need:

1. To specify constraints for any EMF meta-model (batch and live constraints)
2. To specify custom model traversal algorithms for batch validation
3. To specify constraint bindings to application contexts
4. To listen to validation events
5. To define triggers for evaluation of batch and live constraints

Copyright (c) 2000,2005 IBM Corporation and others. All Rights Reserved.