Sfoglia il codice sorgente

Merge branch 'master' into bug/2763-malformed-security-render-error

bubble
shockey 7 anni fa
committed by GitHub
parent
commit
44ea2773cf
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      src/core/utils.js

+ 2
- 2
src/core/utils.js Vedi File

@@ -453,13 +453,13 @@ export const propChecker = (props, nextProps, objectList=[], ignoreList=[]) => {
}

const validateNumber = ( val ) => {
if ( !/^\d+(.?\d+)?$/.test(val)) {
if ( !/^-?\d+(.?\d+)?$/.test(val)) {
return "Value must be a number"
}
}

const validateInteger = ( val ) => {
if ( !/^\d+$/.test(val)) {
if ( !/^-?\d+$/.test(val)) {
return "Value must be integer"
}
}


Caricamento…
Annulla
Salva