File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ function pasteCode(code: string) {
225225 inputBox . name . toLowerCase ( ) . indexOf ( identity ) >= 0 ||
226226 inputBox . id . toLowerCase ( ) . indexOf ( identity ) >= 0
227227 ) {
228- if ( ! inputBox . value ) {
228+ if ( ! inputBox . value || / ^ ( \d { 6 } | \d { 8 } ) $ / . test ( inputBox . value ) ) {
229229 inputBox . value = code ;
230230 fireInputEvents ( inputBox ) ;
231231 }
@@ -240,15 +240,15 @@ function pasteCode(code: string) {
240240 : null ;
241241 if ( activeInputBox ) {
242242 const inputBox = activeInputBox as HTMLInputElement ;
243- if ( ! inputBox . value ) {
243+ if ( ! inputBox . value || / ^ ( \d { 6 } | \d { 8 } ) $ / . test ( inputBox . value ) ) {
244244 inputBox . value = code ;
245245 fireInputEvents ( inputBox ) ;
246246 }
247247 return ;
248248 }
249249
250250 for ( const inputBox of inputBoxes ) {
251- if ( ! inputBox . value && inputBox . type !== "password" ) {
251+ if ( ( ! inputBox . value || / ^ ( \d { 6 } | \d { 8 } ) $ / . test ( inputBox . value ) ) && inputBox . type !== "password" ) {
252252 inputBox . value = code ;
253253 fireInputEvents ( inputBox ) ;
254254 return ;
You can’t perform that action at this time.
0 commit comments