I worked it out.
add_action( 'user_profile_update_errors', 'validate_steamid_field' );
function validate_steamid_field(&$errors, $update = null, &$user = null)
{
if (!preg_match("/^STEAM_[0-5]:[01]:\d+$/", $_POST['_bbp_steamid']))
{
$errors->add('empty_steamid', "<strong>ERROR</strong>: Please Enter a valid SteamID");
}
}
Related Posts:
- Displaying errors on the front end from my plugin
- Show the submitted values in the form when validation fails
- Display all WP Errors together during form validation
- Validating custom fields before post save
- Form Submission Warning: Cannot modify header error only when plugin is deactivated
- Front end post form validation
- Where this validating message come from?
- How to add custom regex validation to WPForms password field
- Code for front end validation for forms not working
- Passing form data on submit
- Form Sanitization and Validation
- How to stopping auto scrolling after submitting the form?
- Custom form validation
- Free or affordable OCR and ICR (handwriting recognition) SDK?
- What characters are allowed in an email address?
- What is an easy way to display a front-end user registration form?
- How to get current url in contact form 7
- Best way to create multi-step form with data saved to user account for later updating?
- Custom Registration Template/Page
- need to add attach thumbnail from my form
- Checkbox won’t check when label is clicked
- jQuery Validate wp_editor
- Nonce actions and names available via open source
- How can i add validation to this login form with out it redirecting to the wp-login.php page
- Performing a POST action on homepage goes to posts page
- Add contact form
- 404 on form submit [duplicate]
- Form Processing
- Form validation in WordPress Admin Panel
- Saving checkbox/option list status?
- Customize reset password form redirect problem
- creating form for wp_remote_post
- How to know what submit button the user clicked?
- How to use TinyMCE in the quick edit form?
- How do I use the info submitted in a form to create a form reception page? (like “thank you {firstName}”) [closed]
- How to retrieve form data?
- Can you disable the mail function in contact form 7 [closed]
- Grab values from the query string to fill in hidden fields in ninja forms [closed]
- Make editor required for post from frontend
- placeholder text in category form label
- nonce in custom form is not verifying
- Use $_POST data in functions.php
- WordPress tabindex Order
- Custom form in admin area, redirect in wrong page
- How to add fields in custom registration form, validate it and aave to db? [closed]
- Form submission in WordPress front end
- How to code auto-retry for API call
- How to check form input against PHP variable?
- Show button once Contact form 7 is submitted
- how to insert textbox value in existing database table in wordpress?
- How to move HTML form to WP Theme
- Is there a reset_button()?
- How can I modify labels in default wordpress registration form? [duplicate]
- Display number of sign-ups [closed]
- Contact form submit, having to click twice
- Is it possible to pass variables to WordPress externally?
- Form within thickbox
- WordPressUser Submission Form
- How to take large file uploads from users the right way
- gravityform – retrieve multiple check answers “keys” instead of “values”
- How to redirect with success message in wordpress admin panel?
- WordPress – Users with contact form on profile
- How to stop iFrame form from reloading on mobile?
- using esc_html_e string in custom form using code snippets
- I’m needing to figure out how to create a page that user could create a “task” and it be selectable on a form
- contact form and WP loop
- How to create a custom range slider in wordpress form?
- Quickly Maintain/edit 100+ WordPress Forms on multiple websites
- Timezone dropdown in form
- jQuery Validation plugin and Bootstrap 4 CSS classes
- Prevent malicious scripts to be submitted in post
- Error handling for wpdb error – displaying an error message to the user
- .html form added to a page
- Unable to submit form using admin post wordpress
- Remove active cursor from form field
- import excel form into wordpress
- Form data from wordpress theme to be submitted in other site url
- Send contact form to a specific referrer-email adres
- admin_post in object oriented plugin
- Contact form spam, without form?
- Custom Contact Form Not Sending (but not giving error)
- How to use the in WP
- How do I capture the selected option and pass in sending the registration form?
- Custom form on front page redirects on error page
- IE 9 Clears Form Fields
- Data inserted in database, but ajax calls error function
- jQuery Live Form Validation in WordPress
- How to get formidable entry ID by post ID? [closed]
- Using form method in a template WordPress page
- Calling custom PHP from a HTML form post action gives 404 error
- Reset form on onclick function
- How to add a checkbox with categories of entries to the form Contact Form 7 WordPress
- Conditional Logic for the Input Mask in Caldera Forms [closed]
- Form that stores emails [closed]
- How do I register user without being authenticated
- How to add or double field?
- How to manage to submit WPForms at our webpage
- Adding default quicktags to textarea
- How can I get lost form data back? [closed]
- Forminator + Hubspot Workflows