? ? Pending

User tests: Successful: Unsuccessful:

avatar Supun94
Supun94
19 Apr 2017

Pull Request for Issue # .

Summary of Changes

This PR contains improvements of core.js JavaScript library. Adding tests for email validation.

Testing Instructions

None, only run on Travis and can test it locally.

Documentation Changes Required

None

avatar Supun94 Supun94 - open - 19 Apr 2017
avatar Supun94 Supun94 - change - 19 Apr 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Apr 2017
Category Unit Tests JavaScript
avatar brianteeman
brianteeman - comment - 19 Apr 2017

Is this the code that is being tested
https://github.com/joomla/joomla-cms/blob/staging/media/system/js/core-uncompressed.js#L230

Its not actually used anywhere

avatar dgt41
dgt41 - comment - 19 Apr 2017

@Supun94 according to the docblock this is only used in one place in Joomla:

	/**
	 * USED IN: administrator/components/com_banners/views/client/tmpl/default.php
	 * Actually, probably not used anywhere. Can we deprecate in favor of <input type="email">?
	 *
	 * Verifies if the string is in a valid email format
	 *
	 * @param string
	 * @return boolean
	 */
	Joomla.isEmail = function( text ) {
		var regex = /^[\w.!#$%&’*+\/=?^`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9-]{2,})+$/i;
		return regex.test( text );
	};

Basically I would like to see all these very specific functions moving out of core.js in J4

But this is fine for Joomla 3.x

avatar brianteeman
brianteeman - comment - 19 Apr 2017

Its not even used there as that file referred to in the doc block doesnt exist

avatar Supun94 Supun94 - change - 20 Apr 2017
Labels Added: ? ?
avatar roland-d
roland-d - comment - 22 Jul 2018

Closing this as this code seems completely unused. Email checking is done in the file media/system/js/validate-uncompressed.js on line 213.

Thank you for your work on this.

avatar roland-d roland-d - change - 22 Jul 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-07-22 20:59:16
Closed_By roland-d
avatar roland-d roland-d - close - 22 Jul 2018

Add a Comment

Login with GitHub to post a comment