# Getters, Setters and Validators

The Basic Configuration example shows how we can add attributes to a host class, and set up default values for them using the attribute configuration object. This example explores how you can configure `setter`, `getter` and `validator` functions for individual attributes, which can be used to modify or normalize attribute values during get and set invocations, and prevent invalid values from being stored.
Enter new values and click the "Set" buttons

- Try entering valid and invalid values for x, y; or values which attempt to position the box outside it's parent (parent box co-ordinates are displayed next to the text box).
- Try entering rgb, hex or keyword color values [ `rgb(255,0,0)`, `#ff0000`, `red` ].

x:

y:

color: