Fix indentation
Rename component
Rename function
Pass containing element from component user
Rename element name
Simplify coordinate validation
Use regex literals
Make regex tighter and use test to validate input
Use regex in grouping input