Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1236 closed enhancement (fixed)

[patch] Custom validation methods for profile field data

Reported by: swinton's profile swinton Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 1.5 Priority: minor
Severity: Version:
Component: Core Keywords: has-patch
Cc:

Description

It would be nice if the xprofile component provided a means of validating profile field data using a custom function.

For example, a profile field 'Post code' should only contain post codes.

This could be achieved by applying a filter on the value returned from is_valid_field in BP_XProfile_ProfileData.

3rd party plugins could then validate the profile data as required.

A suggested patch is attached.

Attachments (1)

bp-xprofile-classes.patch (375 bytes) - added by swinton 15 years ago.

Download all attachments as: .zip

Change History (8)

#1 @DJPaul
15 years ago

  • Keywords has-patch added

#2 @DJPaul
15 years ago

  • Keywords has-patch removed
  • Milestone changed from 1.2 to 1.3

xProfile is to be reviewed and updated in 1.3. Too much ha changed in the 4 months since this was posted for this ticket to be applicable.

#3 @johnjamesjacoby
14 years ago

  • Component set to Core
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

Assigning to myself for xprofile 1.3 make-over.

#4 @paulhastings0
14 years ago

  • Summary changed from Custom validation methods for profile field data to [patch] Custom validation methods for profile field data

#5 @boonebgorges
14 years ago

  • Keywords has-patch added; xprofile validation filter removed

+1 on this idea and on the patch's simple solution. Mr JJJ, you make the final call, since it's assigned to you.

#6 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3395]) Fixes #1236 (branch) props swinton

#7 @johnjamesjacoby
14 years ago

(In [3396]) Fixes #1236 (trunk) props swinton

Note: See TracTickets for help on using tickets.