Commit 05e834ed authored by Bruno López Trigo's avatar Bruno López Trigo

Solucionado bug na subida de arquivos de configuración

parent 6ddda77a
......@@ -513,7 +513,7 @@ class ConfigurationPanel extends React.Component {
changeAttributeName(event) {
var config = this.state.config;
var regex = /^[A-Za-z0-9 -]{3,20}$/;
var regex = /^[A-Za-z0-9 -_]{3,20}$/;
var errorsAttributeName = this.state.errorsAttributeName;
errorsAttributeName[event.target.id] =
......@@ -530,7 +530,7 @@ class ConfigurationPanel extends React.Component {
changePropertyName(event) {
var config = this.state.config;
var regex = /^[A-Za-z0-9 -]{3,20}$/;
var regex = /^[A-Za-z0-9 -_]{3,20}$/;
var errorsPropertyName = this.state.errorsPropertyName;
if (!errorsPropertyName[event.target.name]) {
......@@ -551,7 +551,7 @@ class ConfigurationPanel extends React.Component {
changeCategoricName(event) {
var config = this.state.config;
var regex = /^[A-Za-z0-9 -]{2,20}$/;
var regex = /^[A-Za-z0-9 -_]{2,20}$/;
var errorsPropertyName = this.state.errorsPropertyName;
if (!errorsPropertyName[event.target.name]) {
......@@ -573,7 +573,7 @@ class ConfigurationPanel extends React.Component {
changePropertyNameUser(event) {
var interval = this.state.interval;
var regex = /^[A-Za-z0-9 -]{3,20}$/;
var regex = /^[A-Za-z0-9 -_]{3,20}$/;
var errorsPropertyName = this.state.errorsPropertyName;
if (!errorsPropertyName[event.target.name]) {
......@@ -716,8 +716,8 @@ class ConfigurationPanel extends React.Component {
var reader = new FileReader();
reader.onload = event => {
var obj;
var regexName = /^[A-Za-z0-9 -]{3,20}$/;
var regexCategoric = /^[A-Za-z0-9 -]{2,20}$/;
var regexName = /^[A-Za-z0-9 -_]{3,20}$/;
var regexCategoric = /^[A-Za-z0-9 -_]{2,20}$/;
var regexInterval = /^-?[0-9]+\.?[0-9]*$/;
var errorsAttributeName = this.state.errorsAttributeName;
......@@ -887,7 +887,7 @@ class ConfigurationPanel extends React.Component {
}
if (!errorsPropertyName[i]) {
errorsPropertyName[j] = {};
errorsPropertyName[i] = {};
}
errorsPropertyName[i][j] =
obj.attributes[i].properties[j].name.match(regexCategoric) ===
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment