apply_filters( "lifterlms_validate_custom_user_field_{$field}", boolean $error_message, string $field, WP_User|int $user )

Run custom validation against the field


Description Description

If filter function returns a truthy, validation will stop, fields will not be saved, and an error message will be displayed on screen.

This should return false or a string which will be used as the error message.


Top ↑

Parameters Parameters

$error_message

(boolean) The error message when validation issues are encountered. Return false when no validation issues.

$field

(string) Field id.

$user

(WP_User|int) Instance of WP_User or WP User ID.


Top ↑

Source Source

File: includes/admin/class.llms.admin.user.custom.fields.php

View on GitHub



Top ↑

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.