In CrafterCMS, how can I add a number control that checks a specific range?

I have a Google Maps component where authors can specify latitude and longitude.

I use a regular β€œEnter” control with a regular expression that checks if they are numbers, but when I try to get closer to the task of determining the range (so that longitude confirms that the value is within [-180, 180] and latitude is within [ -90, 90])

However, having this check through regex seems cumbersome, plus it would be nice to use input type="number"

+4
source share

Source: https://habr.com/ru/post/1676784/


All Articles