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 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
As a result, if a user tries to publish the Point 2D with one value, they receive an error message.
