User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This PR contains improvements of core.js JavaScript library. Adding tests for email validation.
None, only run on Travis and can test it locally.
None
Status | New | ⇒ | Pending |
Category | ⇒ | Unit Tests JavaScript |
@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
Its not even used there as that file referred to in the doc block doesnt exist
Labels |
Added:
?
?
|
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.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-22 20:59:16 |
Closed_By | ⇒ | roland-d |
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