The validation tag has no wiki summary.
0
votes
1answer
143 views
Settings API - getting hidden input / submit button's name
I'm generating this form using Settings API:
<form action="options.php" method="post">
<?php settings_fields('XX_theme_settings'); do_settings_sections('my_settings'); ?>
...
0
votes
1answer
336 views
Settings API validation callback
I finally managed to create working validation callback for Settings API with big help of Chip Bennet, there's only one glitch that I'm not sure how to fix.
Here's the foreach loop from my validation ...
1
vote
2answers
556 views
Get the user type of an author
I'm working on a site and I need to get the type of user the author is so I can mark it.
The idea is that if an Admin level user post something it has a [ADMIN] tag or something next to their name. I ...
0
votes
1answer
120 views
W3C validation errors (trailing slashes)
My site is throwing up a few errors typically due to trailing slashes being added.
eg. wordpress is adding in:
<meta name='robots' content='noindex,nofollow' />
my doctype is:
...
1
vote
1answer
589 views
Multiple options pages validation for a plugin
I am writing a plugin and I decided to have multiple pages for different options of the plugin (for clarity's sake). Doing a single option was a piece of cake, but I'm encountering difficulties when ...
0
votes
1answer
59 views
Where this validating message come from?
I wrote a simple form, including text field, textarea, select and some validating by WP_error. When I try to submit the form without filling text field or textarea, I got a popup tip pointing the ...
0
votes
3answers
94 views
How does WP decide how to evaluate database integrity
I've upgraded a handful of WPMU sites from 2.9 to WP3. I've never had problems with that process .. until today, when all of a sudden, one install tells me that the DB is missing some tables. The ...
0
votes
1answer
547 views
How to make custom comment fields required and message field not required
I have a comment form that has name, email, brief, detailed and rating fields.
The name, email, brief and rating need to be required, but the latter two are custom fields and I can only make them ...
0
votes
1answer
173 views
WP calendar summary attribute validation error
When the calendar widget is activated in the sidebar, it generates the following validation error (W3C markup validation):
The summary attribute is obsolete. Consider describing the structure
of ...
1
vote
5answers
719 views
WordPress & W3C CSS Validation
I've played around with WordPress here and there for a few years and am wondering about problems with CSS validation with WordPress themes. This may seems like a stupid question, but:
Is there a ...
0
votes
3answers
621 views
Can a shortcode included in post content add styles to the <head>?
I have a shortcode that iterates through a list of custom post types and, as part of displaying them, creates a block.
In HTML5, it is illegal to have a style block outside the header (maybe in other ...
1
vote
1answer
431 views
Data sanitization for user registration and user login
What kinds of data sanitization I have to do if I make a front end login and registration system for wordpress users?
For login function wp_signon() should I escape the data for
possible sql ...
2
votes
1answer
557 views
How can I make post fields required in Wordpress?
I am setting up a Wordpress site as a CMS and trying to figure out a way to make certain post fields "required" before an author can publish a post.
In particular, I want authors to be required to ...
1
vote
1answer
113 views
Data validation
I find Data Validation page on Codex a bit confusing. It highlights what all functions do but not how one differs from another and which one should be the right choice in a particular use case.
Like ...
1
vote
1answer
155 views
New custom theme option (text input) giving index error
I am using the theme-options.php file from ThemeShaper:
http://themeshaper.com/2010/06/03/sample-theme-options/
I can succesfully add new dropdown options, however when I add a new text input I ...
4
votes
3answers
846 views
How should one implement add_settings_error on custom menu pages?
The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide ...
1
vote
1answer
377 views
How can i add validation to this login form with out it redirecting to the wp-login.php page
Im using the code as posted on the website below, to create a hard coded login form.
http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme
What would be the best way of incorperating some ...
1
vote
1answer
424 views
Creating custom AJAX requests
My question pertains to where I should create an ajax function that I'd like to call from my page view.
I am using a jQuery validator on a custom form that should check the inputted zipcode against ...
2
votes
3answers
301 views
wordpress widget textbox in the sidebar
I have a normal textbox widget that I am using in certain sidebars. The text widget generates a div within a ul. Is there anyway to make the widget generate another ul li instead?
...
2
votes
1answer
658 views
Server side validation for Contact Form 7
I'm trying to use contact form 7 on my site.
The only server side validation that it seems to do is check if required fields have been entered.
Isn't there a danger if someone sends several MB of ...
1
vote
2answers
3k views
wordpress site validation errors
when I made my wordpress site validate I got some strange errors like
Error Line 6, Column 52: Bad value profile for attribute rel on element link: Keyword profile is not registered.
Error Line 12, ...
1
vote
3answers
654 views
Require a Custom Taxonomy to be checked
I have a custom taxonomy, "position", with multiple terms for a custom post type, "employee" in the admin. I want to validate the form to require a position to be selected when you save/update a post.
...
0
votes
1answer
326 views
Display all WP Errors together during form validation
I have a custom front end page where users can post from. All works fine but the i want if more than one field is empty then the errors for all empty fields should show all together. Right now the ...
2
votes
2answers
248 views
Data Validation
I'm using Wordpress as CMS and have a checkout page where info is inserted into the db using $wpdb->insert. I have 2 questions:
Is 'sql injection' already a part of that function or do I need to ...
1
vote
1answer
520 views
Duplicate attribute class causing site validation error
The following bit of code results in a duplicate attribute site validation error.
This template script:
<div class="clearfix" <?php post_class() ?>>
produces this source output:
...
3
votes
1answer
806 views
Does wp_insert_post validate the input?
If I use the wp_insert_post in a plugin, will I have to check the content for SQL injection problems and XSS or will the wp_insert_post function do this for me?
0
votes
1answer
95 views
What is wp_check_invalid_utf8?
The following function checks option, if *blog_charset* is not utf8, than return original string. What is the purpose of this?
function sc_check_invalid_utf8( $string, $strip = false ) {
$string ...
6
votes
3answers
3k views
Sample code for validating custom metabox?
I've found very little on this site or in Google searches for examples of validating metabox custom fields.
If anyone wants to give examples, here are some cases that would be useful
1) Date entered ...
4
votes
3answers
2k views
don't publish custom post type post if a meta data field isn't valid
I have a custom post type (CPT) called event. I have a meta box for the type with several fields. I would like to validate some fields before publishing an event. For example, if an event's date is ...
0
votes
1answer
122 views
Always display a picture even if the link is broken?
What I would like is to have a sort of fall back photo so I don't get red Xs.. Something like "photo unavailable please come back later"
Is there a way to check if the image path is valid and if not ...
2
votes
3answers
365 views
validate a metabox based on the category that is selected
Ok Let's say I have 2 Categories. If a user select category A, they have to fill in metabox A and similarly for category B, it's metabox B. So my question is, I want to do a validate check, whereby if ...
1
vote
2answers
2k views
Frontend Post Form Validation
OK, there have been several posts on here about frontend posting forms. I've read them all, which got me to where I am. Now every form I come across has some form of validation which seems to check ...
1
vote
3answers
484 views
stray <p> elements
I coded a wordpress shortcode for columns that basically inserts html via a shortcode. Problem is that wpautop adds stray p elements that renders the code invalid.
To test put this into your ...
2
votes
2answers
761 views
Correct Approach for Validating Custom Field Input
I have a custom post type with several custom fields. I am looking to do some validation on these fields because they will be used downstream by other services. So, it is important that it can't be ...