This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
Step 7 - Add basic validation¶
To provide basic validation that ensures both coordinates are provided, add assertions to the src/FieldType/Point2D/Value.php
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
As a result, if a user tries to publish the Point 2D with just one value, they will receive an error message.