File tree 2 files changed +6
-13
lines changed
app/code/Magento/Customer/Block/Widget 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -209,24 +209,16 @@ public function getHtmlId()
209
209
public function getHtmlExtraParams ()
210
210
{
211
211
$ validators = [];
212
- $ validators ['required ' ] = true ;
213
- $ validators ['validate-date ' ] = [
214
- 'dateFormat ' => $ this ->getDateFormat ()
215
- ];
216
-
217
- return 'data-validate=" ' . $ this ->_escaper ->escapeHtml (json_encode ($ validators )) . '" ' ;
218
-
219
- $ extraParams = [
220
- "'validate-date':true " ,
221
- ];
222
212
223
213
if ($ this ->isRequired ()) {
224
- $ extraParams [ ] = ' required: true' ;
214
+ $ validators [ ' required ' ] = true ;
225
215
}
226
216
227
- $ extraParams = implode (', ' , $ extraParams );
217
+ $ validators ['validate-date ' ] = [
218
+ 'dateFormat ' => $ this ->getDateFormat ()
219
+ ];
228
220
229
- return 'data-validate="{ ' . $ extraParams . '} " ' ;
221
+ return 'data-validate=" ' . $ this -> _escaper -> escapeHtml ( json_encode ( $ validators )) . '" ' ;
230
222
}
231
223
232
224
/**
Original file line number Diff line number Diff line change 973
973
return $ . mage . isEmptyNoTrim ( value ) || test . isValid ( ) ;
974
974
} ,
975
975
$ . mage . __ ( 'Please enter a valid date.' )
976
+
976
977
] ,
977
978
'validate-date-range' : [
978
979
function ( v , elm ) {
You can’t perform that action at this time.
0 commit comments