Grid view ignores Regular Expression validator

I would think this would be a common issue. It seems when editing data from the grid view, it ignores the Regular Expression validator defined in the class definition for the field? Is there any way around that, short of validating with Event Listeners instead?

Also, is there a way to highlight or call attention to invalid data in the grid view?

I ended up just using Event Listeners for the validation on save. That gives more flexibility than the class RegExp validator anyway.

To accomplish the second part of my question, I looked a bit into Operators ( I was able to at least to visually get it to work using a PHPCode operator, but it makes it a non-editable field. Gridview editing is huge for our processes because it makes mass changes so much easier, and these visual indicators an important part of that process. Is there existing way in Pimcore to adjust CSS styling for a field if it fails the validation check? Or do I need to look more into doing it with Ext.js?

I would suggest using a calculated field for that (Question 2).

That’s a good thought. I haven’t tried it, but I don’t think calculated fields are editable, correct? It would be similar to using the PHPCode Operator, wouldn’t it?

I meant using an additional calculated field for displaying the validation status. For example it could show the 2 values “valid” and “invalid” based on your validation rule.

I’m going to play with using Workflows. It’s a bit different approach than we’ve been using, but I think it could work for what I’m after.