This are the priorities of configuration form.

1. Type of field
display only specific fields
#2695369: Allow only text and integer fields for field based login

2. Is mandatory or not
After submitting the configuration form, check either selected field is mandatory or not. based on that display user specific message.

3. Is unique or not
Error message to be display, In case selected field is not unique. Avoid saving configuration.

4. All users has the data or not
Warning message to be display while form submission, saying that "some of users doesn’t have data for the specific field type,".

Comments

krknth created an issue. See original summary.

xaiwant’s picture

Issue summary: View changes
xaiwant’s picture

Priority: Normal » Major
xaiwant’s picture

Issue summary: View changes
n.kishorekumar’s picture

Assigned: n.kishorekumar » Unassigned
Status: Active » Needs review

1)warning message if field is not mandatory
2)warning message if All users has not have the data
Is unique or not
Error message to be display, In case selected field is not unique. Avoid saving configuration - already implemented

please find the patch

n.kishorekumar’s picture

StatusFileSize
new2.58 KB

forgot to attach patch sorry...

krknth’s picture

Status: Needs review » Needs work

@kishore : _user_count() is not valid function name in particular module.

Make sure you are not using any static fields -

+  $field_type = field_info_instance('user', 'field_mobile_number', 'user');
n.kishorekumar’s picture

StatusFileSize
new2.65 KB

Updated the function name with coding standard
removed the static field name

Please find the updated patch

n.kishorekumar’s picture

Status: Needs work » Needs review
xaiwant’s picture

Assigned: Unassigned » n.kishorekumar
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new52.56 KB

1. type of field
display only specific fields

added multiple types of field under user account, only TEXT and INTEGER field type are listing
This is Correct as i expected

2. Is mandatory or not
After submitting the configuration form, check either selected field is mandatory or not. based on that display user specific message.

getting warning message
refer issue-2 image

3. Is unique or not
Error message to be display, In case selected field is not unique. Avoid saving configuration.

Done, getting error message on user edit page when we try to violate unique data value.

4. All users has the data or not
Warning message to be display while form submission, saying that "some of users doesn’t have data for the specific field type,".

getting warning message

Selected field is not mandatory.
Selected field is not having data for some of the user

xaiwant’s picture

Title: Configuration form validation priorities » Field Based Login Configuration form validation
heykarthikwithu’s picture

Issue summary: View changes

heykarthikwithu’s picture

Assigned: n.kishorekumar » Unassigned
Status: Reviewed & tested by the community » Fixed

Committed..

heykarthikwithu’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.