OK, first problem was that you hadn't (as per my first post) "changed the element names to suit", you were using the wrong element name. Your full element name is tva25_fb_registration___registration_date_id, not registration___registration_date_id. I should maybe have been more specific. But whenever refering to elements in Fabrik with the ___ separated style of tablename___elementname, you can always look at your main list of elements, and see / copy that.
Second problem was that you had a space inside that quoted name, 'registration___registration_date_id ', which is somehting you have to be very careful about in any programming language, spaces are significant!
Third problem was you'd taken me a bit too literally and removed the 'return' from the last line logic, rather than just changing the logic, so the script wasn't actually returning any value.
Fourth problem was on me, I forgot a line of code as the second line, to turn that data into a simple value instead of an array.
Anyway ... it now makes it through to the end of the code, and I can var_dump() out the values.
However, I have no idea what values I need to use on the form to test for a fail. If you can tell me what I need to put to a) have a submission pass and b) have a submission fail, I can actually test it.
NOTE - I had to disable the 'not empty' validation on that element to test the PHP.
-- hugh