The `where` can be used to perform changes/validations conditionally. This functions by running the validation, and if the validation returns an error, we discard the error and skip the operation. This means that even custom validations can be used in conditions.
For example:
```elixir
validate present(:other_number) do
where [{MyApp.Validations.IsPrime, attribute: :foo}]
end
```
## Action vs Global Validations
You can place a validation in any create, update, or destroy action. For example:
Or you can use the global validations block to validate on all actions of a given type. Where statements can be used in either. Use `on` to determine the types of actions the validation runs on. By default, it only runs on create an update actions