Adding more info to item validation error message

3 views
Skip to first unread message

Alexander Obuhovich

unread,
Aug 20, 2012, 11:24:00 AM8/20/12
to Development In-Portal
When validation of an item fails In-Portal triggers a notice with following text and adds detailed error list in a debugger report:

Notice (#1): Validation failed in prefix - conf, FieldErrors follow (look at items with "pseudo" key set)
You may ignore this notice if submitted data really has a validation error in ...\core\kernel\utility\validator.php on line 120



If you're editing only 1 record at a time (e.g. on editing page), then this is normal. But when multiple items are changed in database (e.g. 20), and only several of them have validation errors, then it's hard to determine which ones exactly.


I'm proposing to display item's ID and Title Field value as a help in solving this item identification problem. With proposed changed message now will look as follows:

Notice (#1): Validation failed in prefix - conf (VariableId: 55; VariableName: Require_AdminSSL), FieldErrors follow (look at items with "pseudo" key set)
You may ignore this notice if submitted data really has a validation error in ...\core\kernel\utility\validator.php on line 120

Highlighted part is added one.



Ready for testing.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
more_info_about_validated_item.patch

Phil

unread,
Aug 20, 2012, 11:25:45 AM8/20/12
to in-por...@googlegroups.com
This would have been very useful for me many times, great thing :)


Envoyé avec Sparrow

Pièces jointes :
- more_info_about_validated_item.patch

Dmitry A.

unread,
Sep 16, 2012, 1:01:28 AM9/16/12
to in-por...@googlegroups.com
Great improvement Alex.

Thanks for sharing.


DA
Reply all
Reply to author
Forward
0 new messages