As outlined here I'm working with GeoPositionFields
. Because this is not supported from Zend, I went with a standard RegEx
validator.
It works great but I still need a custom error message - any ideas how to achieve this?
The one in my example just does nothing...
/**
* @ORM\Column(type="string")
* @Form\Filter({"name":"StringTrim"})
* @Form\Validator({"name":"Regex", "options":{"pattern":"/(-?\d{1,3}\D\d+)[^\d-]+(-?\d{1,3}\D\d+)/"}})
* @Form\ErrorMessage("My custom message")
* @Form\Attributes({"type":"text"})
* @Form\Options({"label":"GeoPos"})
*
*/
protected $geopoint;
Even this one is just beeing ignored:
@Form\Messages({"regexNotMatch": "My custom message"})