There is a validate written in the code for this but doesn’t seem to work.

if ( ($name != $form_state->getValue('orig_name')) && isset($settings[$name]) ) {
$form_state->setErrorByName('name', t('This name has already been used. Please try another.'));
}

Comments

karthick.rajamohan created an issue. See original summary.

wingpaler’s picture

Assigned: Unassigned » wingpaler
wingpaler’s picture

Assigned: wingpaler » Unassigned
Status: Active » Needs review
Issue tags: +SprintWeekend2018
StatusFileSize
new701 bytes

Name validation fixed. Added '$settings' variable loader.

sastha’s picture

Assigned: Unassigned » sastha
sastha’s picture

Assigned: sastha » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new28.81 KB

Patch works. Tested successfully.

Please refer screenshot.

Patch testing screenshot
Only local images are allowed.

  • baikho committed badd66b on 8.x-1.x authored by wingpaler
    Issue #2857027 by wingpaler, sastha, karthick.rajamohan: Name validate...
baikho’s picture

Status: Reviewed & tested by the community » Fixed

  • baikho committed 31fbeb0 on 8.x-1.x
    Issue #2857027 by baikho: Fixed unknown var orig_name
    

Status: Fixed » Closed (fixed)

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