> For the complete documentation index, see [llms.txt](https://giorgosart.gitbook.io/react-easy-edit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giorgosart.gitbook.io/react-easy-edit/validation.md).

# Validation

Each EasyEdit component can have its own custom validation rules, see examples below:

### Input validation

The component below shows how easy it is to add a basic null check on the component's value. if the user attempts to save without adding any value in the field rendered, then they will see the validation message "Please provide a valid value" and the component will prevent them from saving. You can always change the validation message by passing in the message you would like in the `validationMessage` prop or overwrite the style by overwriting the css class `easy-edit-validation-error`

```jsx
<EasyEdit
  type={Types.TEXT}
  onSave={(value) => {alert(value)}}
  onValidate={value => {return value != null}}
/>
```
