mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-14 20:35:47 +01:00
Core: Use charAt instead of array notation on strings, to support IE8(?)
Closes #1067
This commit is contained in:
committed by
Jörn Zaefferer
parent
4a3c23dcbe
commit
69e1c5f1d3
@@ -617,7 +617,7 @@ $.extend($.validator, {
|
||||
// specified in the element's HTML5 data attribute
|
||||
// return the generic message if present and no method specific message is present
|
||||
customDataMessage: function( element, method ) {
|
||||
return $( element ).data( "msg" + method[ 0 ].toUpperCase() +
|
||||
return $( element ).data( "msg" + method.charAt( 0 ).toUpperCase() +
|
||||
method.substring( 1 ).toLowerCase() ) || $( element ).data("msg");
|
||||
},
|
||||
|
||||
@@ -922,7 +922,7 @@ $.extend($.validator, {
|
||||
var method, value,
|
||||
rules = {}, $element = $( element );
|
||||
for ( method in $.validator.methods ) {
|
||||
value = $element.data( "rule" + method[ 0 ].toUpperCase() + method.substring( 1 ).toLowerCase() );
|
||||
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
|
||||
if ( value !== undefined ) {
|
||||
rules[ method ] = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user