Problem/Motivation

Currently, the logic to validate a git_username is highly tied to the form validation hooks. This validation can be really useful in other places and should not be tied to "form_set_error" calls or similar.

Steps to reproduce

Try to validate a git_username outside that form context, you can't without duplicating validation rules.

Proposed resolution

Have a separate re-usable method that does the validation and then have the form use it.

Remaining tasks

Work on it.

User interface changes

None.

API changes

There will be a new re-usable function to validate gitlab usernames after this.

Data model changes

None.

Issue fork drupalorg-3302622

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Assigned: fjgarlin » Unassigned
Status: Active » Needs review

Please review.

drumm made their first commit to this issue’s fork.

  • drumm committed 533c497 on 7.x-3.x authored by fjgarlin
    Issue #3302622: Isolate the logic to validate a gitlab username so it...
drumm’s picture

Status: Needs review » Fixed

Deployed with a small fixup.

Status: Fixed » Closed (fixed)

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