The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
12 views

Gravity Forms validate arrival and departure

I am working recently with GF and encounter the first problem: I have two datepicker; one is "arrival" and one is "departure". Now - of course - the "departure" can't be before "arrival". I've found ...
0
votes
1answer
15 views

Plugin option for input box validation

I'm crating a plugin option page from the code below. However, it does not explain how to get validation on the input fields. How do I get validation on id_number for NUMBER ONLY? ...
1
vote
1answer
24 views

Unable to sanitize in customizer and escape in theme without removing ability for user to use “< br >” to insert a line break

I have been unable to figure out how I can properly sanitize (in the customizer) and escape (in the theme, while allowing the user to use "<" and ">" to insert a '< br >' and add a line break ...
0
votes
0answers
25 views

Server side validation on AJAX form submit from front-end

My current server side validation is not working with AJAX submit. // Tracking error messages function write_here_errors(){ static $wp_error; // Will hold global variable safely return ...
0
votes
1answer
48 views

How to add HTML5 required on wp_editor

I want to add HTML5 required for the client side validation on textarea generated by <?php $content = ''; $editor_id = 'YOURID'; wp_editor( $content, $editor_id ); ?> What is the ...
0
votes
0answers
16 views

How to format the various types of custom fields?

So i am ready to throw in my custom post type a bunch of custom fields. All these fields need specific handling for their input and validation. Exmaples: Numeric fields E-mails WYSIWYG editor ...
0
votes
1answer
67 views

Validate form in functions.php, send errors back to template

I have a form in a template that upon submission should be validated, and any errors should be displayed, and if no errors, insert the data into the database. I'm new to wordpress, but my idea was ...
0
votes
0answers
85 views

Validating Custom User Profile Fields on Admin Profile Page

I have a number of custom fields (using Advanced Custom Fields) on the User Profile pages in the Admin Area. They work fine in most respects. They are displayed and the user can select and store data ...
0
votes
0answers
31 views

Custom registration validation plugin function conflict with register_post

I have a simple question, The wordpress docs say, "Please note that this hook (register_post) should never be used for custom validation. Any custom validation rules should be performed using the ...
-1
votes
1answer
423 views

Disable woocommerce PLACE ORDER button if user selected products that are not available for international delivery

In my woocommerce site, I list both products that are available for shipping to India as well as International destinations. Am assigning a only-india shipping class to certain products so as to mark ...
0
votes
0answers
14 views

How to make two permanent categories that every one has to press before posting something [duplicate]

How to make two permanent categories that everyone has to press before posting something.
0
votes
1answer
365 views

How to bypass Woocommerce checkout validation from the plugin? [closed]

I need to bypass any validation process in Woocommerce checkout page when Process Order button clicked. What filter or action hooks should I use?
0
votes
0answers
46 views

Why is my script's regex having its backslash removed?

One of my company's child themes requires customization. I am customizing using jQuery and have noticed in my function's regex (function lives in the "scripts" section of "Pages"--->My Page) that ...
0
votes
0answers
44 views

Add a class or id to the category search field, force people to select a category [searchform]

I am using a search form which is category field available. I'm looking for a solution to add an id into the category field. I tried to get it work by myself. But, it turns out to be error. ==" I got ...
1
vote
1answer
306 views

How to Remove novalidate attribute from comment form

I'm using html5 support for input formats and custom comment form fields with this code: <?php $commenter = wp_get_current_commenter(); $args = wp_parse_args( $args ); if ...
0
votes
0answers
51 views

Displaying errors on the front end from my plugin

I am creating a plugin that has a frontend form, which in turn has some validation.. Errors if validation fails and success if it passes. I have tried everything and can't get messages to appear on ...
0
votes
1answer
3k views

Conditional required fields for Wordpress Contact Form 7

I know this might be considered off topic but I am not sure where else to post this as it also pertains to WordPress as well as the plugin Contact Form 7. If you know where I should post this other ...
0
votes
1answer
791 views

How to Generate & Validate License Key for a Wordpress Plugin?

now as I've developed a very simple wordpress plugin, I want to add encryption to it. What I need is a code that generated serial keys (cryptographically), stores it in my database and then when ...
0
votes
1answer
34 views

Show the submitted values in the form when validation fails

Currently I do: $options = get_option( 'jons-plugin-options' ); echo "<input id='jons-plugin-options[field-two]' name='jons-plugin-options[field-two]' size='4' type='text' value='" . ...
1
vote
1answer
70 views

Data Validation: Always escape late / escape HTML Code

I uploaded a Theme at THE marketplace and got soft rejected because I should "always escape late" I am not sure how to solve this other than I did. I have multiple if statements where HTML is saved ...
0
votes
1answer
65 views

Proper Way to Sanitize Meta Input

I have a meta field which gets displaed in the admin panel look like: $field = get_post_meta($postid, 'field_name', true); ?> <input type="text" name="field_name" value="<?php echo ...
0
votes
0answers
23 views

How to display errors onto fields on user update

I'm surprised to see that WP doesn't simple have validation for user profile fields. So, I created some new fields and I want to highlight the ones with bad values. For the moment, I made this ...
0
votes
1answer
64 views

Why the WP Core team does not allow filter_* functions? [closed]

This question is somehow related to this other question. Provided that is seems we have a solution for the magic quotes issues, why the WP Core team does not allow them? This is unclear to me and I ...
1
vote
1answer
319 views

How to use the built in tooltip for form validation error messages in WP admin plugin?

I'm building a wordpress plugin that includes serveral menus in the wordpress backend (admin). I'd like to use as many existing parts as possible and make my menus look like the standard wordpress ...
0
votes
1answer
83 views

Remove comments validation (remove filter?)

How i can remove wordpress comments content validation, I do not want to or examined the earlier there was no such comments. I see for: ...
1
vote
1answer
205 views

WordPress oEmbed W3C Validation

I recently built a theme that utilises the oEmbed feature in WordPress. Where possible, I like my themes to validate via W3C. The content of the website is driven by Vimeo videos, so I'm getting ...
0
votes
1answer
46 views

Warn user that data may be lost for custom pages

When you edit a builtin field in Wordpress like the title and don't save the cahnges, and attempt to go to another link, a warning alert box comes up stating that "changes may be lost if you navigate ...
0
votes
0answers
26 views

Validation Always Tells There Is an Open DIV

The Validator will just not accept my website and is always telling me, there are two errors: 1. an open DIV ("inhalt") 2. an article left ... and I just can not find the errors in the index.php. ...
0
votes
1answer
597 views

Validate Uploaded Image using WordPress' Built-in Functions?

I have a form that allows users to upload an image. I'm using the code below (which currently doesn't work) to ensure what a user uploads is valid. Can someone help me out and either update my code ...
6
votes
5answers
731 views

Server side validation

I'm trying to do some server side validation of post fields (custom and/or non-custom fields). Validation works just fine, but I can't seem to stop the post from saving if validation fails. I tried ...
1
vote
0answers
47 views

Multiple register settings, with same option name - issue

I already posted this question in wordpress support forums here but I didn't get any help and nor could I find a solution yet. As the title says, I am calling register_settings functions multiple ...
0
votes
1answer
414 views

Set Default Option Value as Blank for Meta Box

My custom Meta Box has a drop down field, but how do I set the default Option Value to be blank? It is currently populating via the CPT's meta_value, but I'd like that to change. Here's a screenshot ...
0
votes
3answers
4k views

How to check if a string is a valid URL

WordPress provides a helpful function called is_email() which checks if a given email address is valid. Is there a similar function available to check if a URL is valid? I tried is_url() but that was ...
0
votes
1answer
151 views

Flush rewrite rules on option update with Settings API

I'm working on some plugin where I need to enable custom URL rewrites. I want to enable editing of custom URL through Settings API, so basically I did everything that's needed to validate and update ...
0
votes
1answer
493 views

is_email() VS sanitize_email()

If I'm allowing a user to enter an email address to be saved into the database, should I use is_email() or sanitize_email()? Ex. update_user_meta( $user_id, $social_site, sanitize_email( ...
0
votes
1answer
107 views

Can we validate user email changes?

I am having difficulty understanding why user security and validation is so vague in WP (4.0).. Surely email verification should come as default? Anyway I have been trying to find a solution to user ...
0
votes
1answer
556 views

Safely store code(html/js..) into database

So I'm working on a small plugin, and this plugin allows users to save data to my db. This data is mostly plain text but 3 fields are will have tags inside them. 1 field can be used to save all kind ...
0
votes
1answer
372 views

Sanitizing and validating email field

Should I use is_email() to validate an email field? In WP. I've put the email field in a widget. I would really appreciate some help. function update($new_instance, $old_instance) { $instance = ...
1
vote
1answer
490 views

Add Div to Comment Form

I have some code that displays my comment form and my custom validation, what I'd like to do is add a div right underneath the title, but I'm not sure how to do that because that code is generated... ...
0
votes
2answers
3k views

contact form in template with jquery,validate and ajax

I have a page-contact.php for my contact form in my template. I wanted to add jquery validation and some fancy ajax action to my form. This is already a working code in a simple PHP page, but getting ...
0
votes
1answer
404 views

Meta title W3C Validation Error with

On the single post, the WordPress generates the meta title automatically but it gives validation error. This is what WordPress generates: <meta name="title" content="The post title goes here" ...
1
vote
0answers
79 views

Resetting admin post form on JS validation fail

I've got a custom plugin with a metabox and dynamic form (the user can ask for more elements of the form), with jQuery Validation plugin working great. The problem is when the validation comes back ...
2
votes
0answers
141 views

Check for and enforce unique value in user-entered custom meta field in WP Admin

I am trying to figure out how, on a new or edit post screen, to allow the user to enter a custom meta item, BUT force it to be unique. Ideally the process would work like so: Contributor logs into ...
0
votes
0answers
325 views

Remove WordPress default registration client side validation?

Is there a way to remove/disable WordPress default registration client side validation? I dislike the pop alert and would like to add my own client side validation visual to users. Please assist me ...
0
votes
1answer
72 views

Which hook should I use for this scenario regarding the registration process and account/profile update?

I would like to run a PHP script "ONLY" when a user successfully fills out the WordPress Registration form and submits it as well as when a user updates their profile. Here's what I have so far, ...
0
votes
0answers
149 views

Ampersands do not display

I've got a WooCommerce install, running on the latest WordPress version. I'm using the discover theme by antthemes.com. There are four boxes at the bottom of the homepage which allows you to change ...
0
votes
1answer
4k views

Contact Form 7: custom validation [closed]

I'm currently using the Contact Form 7 plugin, which is great and works perfectly, but what I'm now trying to achieve with it is some custom validation rules. I found this extension: ...
0
votes
1answer
59 views

How to validation for sanitize_URL?

Like sanitize_email validation is options available but sanitize_url options is available .if options is not available then how can i do this . http://i.imgur.com/WPYdkTb.png
0
votes
1answer
735 views

jQuery Live Form Validation in Wordpress

I'm trying to implement the form validation that can be found at: http://www.geektantra.com/2009/09/jquery-live-form-validation/ I can get the demo above working, but when I implement it on my ...
0
votes
1answer
177 views

Verify Nonce returns false - Request Nonce returns correct value

I'm trying to verify that the nonce I created exists but for some reason it keeps returning false, why is this happening? Creating my nonce: <?php ...