# Section 3 - Validation and Error messages

In this section we will cover validation rules for FX Tiles.

## Validation

When setting up an FX tile, any data entered by users is checked for validation. Entering non-numerical amounts or using invalid date formats will trigger error messages that prompt the user to make amendments:

![Validation_error_example_Revised](../../images/Validation_error_example_Revised.PNG)

In both of the above error cases the FX Tile will remain in a disabled state until a valid amount or settlement date is entered. When the tile is disabled in such a way, it prevents the user from viewing rates or attempting to trade.

## Field validation rules

This section lists validation rules for the following fields:

* Trade amount
* Settlement date

### Trade amount

**Data type**: Currency

**Range**: >0.01 to GFA for the particular currency pair.

**📌 NOTE**\
GFA is the 'Good for Amount' limit which represents the maximum volume that can be traded on a particular currency pair (see Section 1 for more details). This limit will appear within the Trade amount field e.g. 1M, 50M etc.

Amounts must be stated using numerical characters or a notational shortcut that is supported by the FX Tile e.g. 1K (this means 1000), 5M (this means 5,000,000).

If the amount is invalid, an error message is displayed "Please supply a valid amount"

If input exceeds the GFA for the currency, then the user can longer view streaming rates or trade.

**Valid formats**

| Format | Example |
| --- | --- |
| ## | 10 |
| \#.# | 8.5 |
| #[KMkm] | 1K |
| \#.#[KMkm] | 10.5M |

### Settlement date

**Data type**: Date

**Range**: N/A

The field accepts user input and also provides visual controls for selecting dates using a date picker utility. Shortcut notations for picking Tenor dates are also supported e.g. 1W (one week from Spot), 2M (two months from Spot).

If the date is invalid, an error message will be displayed indicating the correct format to be used when inputting a date: "Invalid date [user input]. Date must be in YYYY-MM-DD or YYYYMMDD format."

**Valid formats**

| Format | Example |
| --- | --- |
| YYYY-MM-DD | 2015-06-15 |
| YYYY/MM/DD | 2015/06/15 |
| DD-MM-YYYY | 15-06-2015 |
| DD/MM/YYYY | 15/06/2015 |
| DDMMYYYY | 15062015 |
| YYYYMMDD | 20150615 |
| DDMMYY | 150615 |
| DD/MM/YY | 15/06/15 |
| #[WMYwmy] | 2M |
| TOD|TOM|SPOT | SPOT |

---

**FX Tiles Documentation:**

* [Introduction](fx-tiles.md)
* [Section 1 - Using an FX Tile](section-1-using-an-fx-tile.md)
* [Section 2 - Using other FX Tile components](section-2-using-other-fx-tile-components.md)
* [Section 3 - Validation and Error messages](section-3-validation-and-error-messages.md)
* [Section 4 - One-way pricing](section-4-one-way-pricing.md)
* [Section 5 - NDF Tiles](ndf-tiles.md)
* [Section 6 - Integrating FX data with a tile](section-5-integrating-fx-data-with-a-tile.md)
* [Section 7 - System Availability and Permissioning](section-6-system-availability-and-permissioning.md)
* [Section 8 - Code architecture](fx-tiles-code-architecture.md)
