[wp-trac] [WordPress Trac] #11474: Add validation error reporting system to Settings API
WordPress Trac
wp-trac at lists.automattic.com
Sat Aug 14 12:07:07 UTC 2010
#11474: Add validation error reporting system to Settings API
-------------------------------------+--------------------------------------
Reporter: jeremyclarke | Owner: jeremyclarke
Type: enhancement | Status: reopened
Priority: high | Milestone: 3.0
Component: Administration | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+--------------------------------------
Changes (by pulser1983):
* cc: pulser1983 (added)
* status: closed => reopened
* version: 2.9 => 3.0.1
* resolution: fixed =>
Comment:
Hi Friends,
I Have a suggestion regarding get_settings_errors($setting).
Suppose get_settings_errors($setting) give me this output.
{{{
Array
(
[0] => Array
(
[setting] => rt-option
[code] => email
[message] => email is invalid.
[type] => error
)
[1] => Array
(
[setting] => rt-option
[code] => name
[message] => name cannot be empty.
[type] => error
)
)
}}}
I couldn't find a fay to fetch the message for ''name'' directly.
My proposal is get_settings_errors() should accept three argument,
example..
{{{
get_settings_errors( $setting = '', $code = '', $sanitize = FALSE )
}}}
This way user can print error message near the input box directly. Also
printing the error message on header is not always helpful.
I hope you take my point into consideration.
Thanks
Radhe
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11474#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list