Hook Detail

Plugin: Formidable Lite
Filter Name: frm_validate_field_entry
KB Link:
Declaration:
apply_filters( 'frm_validate_field_entry', $errors, $posted_field, $value, $args );
Filter Type:
Static
In class:
FrmEntryValidate
Source:
formidable/classes/models/FrmEntryValidate.php
Notes:

This hook can be used to create your own custom field validations and errors. The Pro validation is also run using this hook. It runs with a priority of 10. The Pro validation will remove any error messages for fields that are conditionally hidden, so you may want to run your function with a priority below 10.

This hook is run every time the submit button is clicked.

The KB page that references this filter falls under the topic of Creating Add-ons and should be of particular interest to developers.

Contribute Comments or Examples

Codex Comments/Examples
First
Last
Mastermind Contributor: Lisa Thrower

I helped someone with this in the slack group so thought I would put it here as well. It adds field validation to make sure the user is entering a higher value than any previously entered. It uses FrmEntryMeta::get_entry_metas_for_field to get the existing entry values.

add_filter('frm_validate_field_entry', 'require_higher_bid', 10, 3);
function require_higher_bid($errors, $posted_field, $posted_value){
if ( $posted_field->id == 25 && $posted_value != '' ) { //change 25 to the ID of the field to change
$previous_bids = FrmEntryMeta::get_entry_metas_for_field( $posted_field->id ) ;
$high_bid = max($previous_bids);
if ($posted_value id] = 'Looks like you have been outbid! Raise your bid and try again!';
}
return $errors;
}