Browse Source

refactor: revise validation messages

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1052/head
Wing-Kam Wong 3 years ago
parent
commit
58bd645b69
  1. 8
      packages/nc-gui/helpers/sqlUi/MssqlUi.js
  2. 8
      packages/nc-gui/helpers/sqlUi/MysqlUi.js
  3. 8
      packages/nc-gui/helpers/sqlUi/OracleUi.js
  4. 8
      packages/nc-gui/helpers/sqlUi/PgUi.js
  5. 8
      packages/nc-gui/helpers/sqlUi/SqliteUi.js
  6. 8
      packages/nocodb/src/lib/sqlUi/MssqlUi.ts
  7. 8
      packages/nocodb/src/lib/sqlUi/MysqlUi.ts
  8. 8
      packages/nocodb/src/lib/sqlUi/OracleUi.ts
  9. 8
      packages/nocodb/src/lib/sqlUi/PgUi.ts
  10. 8
      packages/nocodb/src/lib/sqlUi/SqliteUi.ts

8
packages/nc-gui/helpers/sqlUi/MssqlUi.js

@ -1065,15 +1065,15 @@ export class MssqlUi {
break
case 'PhoneNumber':
colProp.dt = 'varchar'
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : isMobilePhone'] }
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : Invalid Mobile Format'] }
break
case 'Email':
colProp.dt = 'varchar'
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : isEmail'] }
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : Invalid Email Format'] }
break
case 'URL':
colProp.dt = 'varchar'
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : isURL'] }
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : Invalid URL Format'] }
break
case 'Number':
colProp.dt = 'int'
@ -1083,7 +1083,7 @@ export class MssqlUi {
break
case 'Currency':
colProp.dt = 'decimal'
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : isCurrency'] }
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : Invalid Currency Format'] }
break
case 'Percent':
colProp.dt = 'double'

8
packages/nc-gui/helpers/sqlUi/MysqlUi.js

@ -961,16 +961,16 @@ export class MysqlUi {
colProp.validate = {
func: ['isMobilePhone'],
args: [''],
msg: ['Validation failed : isMobilePhone ({cn})']
msg: ['Validation failed : Invalid Mobile Format ({cn})']
}
break
case 'Email':
colProp.dt = 'varchar'
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : isEmail ({cn})'] }
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : Invalid Email Format ({cn})'] }
break
case 'URL':
colProp.dt = 'varchar'
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : isURL ({cn})'] }
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : Invalid URL Format ({cn})'] }
break
case 'Number':
colProp.dt = 'int'
@ -980,7 +980,7 @@ export class MysqlUi {
break
case 'Currency':
colProp.dt = 'decimal'
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : isCurrency'] }
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : Invalid Currency Format'] }
break
case 'Percent':
colProp.dt = 'double'

8
packages/nc-gui/helpers/sqlUi/OracleUi.js

@ -824,15 +824,15 @@ export class OracleUi {
break
case 'PhoneNumber':
colProp.dt = 'varchar'
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : isMobilePhone'] }
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : Invalid Mobile Format'] }
break
case 'Email':
colProp.dt = 'varchar'
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : isEmail'] }
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : Invalid Email Format'] }
break
case 'URL':
colProp.dt = 'varchar'
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : isURL'] }
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : Invalid URL Format'] }
break
case 'Number':
colProp.dt = 'integer'
@ -842,7 +842,7 @@ export class OracleUi {
break
case 'Currency':
colProp.dt = 'decimal'
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : isCurrency'] }
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : Invalid Currency Format'] }
break
case 'Percent':
colProp.dt = 'double'

8
packages/nc-gui/helpers/sqlUi/PgUi.js

@ -1588,15 +1588,15 @@ export class PgUi {
break
case 'PhoneNumber':
colProp.dt = 'character varying'
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : isMobilePhone'] }
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : Invalid Mobile Format'] }
break
case 'Email':
colProp.dt = 'character varying'
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : isEmail'] }
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : Invalid Email Format'] }
break
case 'URL':
colProp.dt = 'character varying'
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : isURL'] }
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : Invalid URL Format'] }
break
case 'Number':
colProp.dt = 'int8'
@ -1606,7 +1606,7 @@ export class PgUi {
break
case 'Currency':
colProp.dt = 'decimal'
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : isCurrency'] }
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : Invalid Currency Format'] }
break
case 'Percent':
colProp.dt = 'double'

8
packages/nc-gui/helpers/sqlUi/SqliteUi.js

@ -787,15 +787,15 @@ export class SqliteUi {
break
case 'PhoneNumber':
colProp.dt = 'varchar'
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : isMobilePhone'] }
colProp.validate = { func: ['isMobilePhone'], args: [''], msg: ['Validation failed : Invalid Mobile Format'] }
break
case 'Email':
colProp.dt = 'varchar'
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : isEmail'] }
colProp.validate = { func: ['isEmail'], args: [''], msg: ['Validation failed : Invalid Email Format'] }
break
case 'URL':
colProp.dt = 'varchar'
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : isURL'] }
colProp.validate = { func: ['isURL'], args: [''], msg: ['Validation failed : Invalid URL Format'] }
break
case 'Number':
colProp.dt = 'integer'
@ -805,7 +805,7 @@ export class SqliteUi {
break
case 'Currency':
colProp.dt = 'double precision'
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : isCurrency'] }
colProp.validate = { func: ['isCurrency'], args: [''], msg: ['Validation failed : Invalid Currency Format'] }
break
case 'Percent':
colProp.dt = 'double'

8
packages/nocodb/src/lib/sqlUi/MssqlUi.ts

@ -1090,7 +1090,7 @@ export class MssqlUi {
colProp.validate = {
func: ['isMobilePhone'],
args: [''],
msg: ['Validation failed : isMobilePhone']
msg: ['Validation failed : Invalid Mobile Format']
};
break;
case 'Email':
@ -1098,7 +1098,7 @@ export class MssqlUi {
colProp.validate = {
func: ['isEmail'],
args: [''],
msg: ['Validation failed : isEmail']
msg: ['Validation failed : Invalid Email Format']
};
break;
case 'URL':
@ -1106,7 +1106,7 @@ export class MssqlUi {
colProp.validate = {
func: ['isURL'],
args: [''],
msg: ['Validation failed : isURL']
msg: ['Validation failed : Invalid URL Format']
};
break;
case 'Number':
@ -1120,7 +1120,7 @@ export class MssqlUi {
colProp.validate = {
func: ['isCurrency'],
args: [''],
msg: ['Validation failed : isCurrency']
msg: ['Validation failed : Invalid Currency Format']
};
break;
case 'Percent':

8
packages/nocodb/src/lib/sqlUi/MysqlUi.ts

@ -986,7 +986,7 @@ export class MysqlUi {
colProp.validate = {
func: ['isMobilePhone'],
args: [''],
msg: ['Validation failed : isMobilePhone ({cn})']
msg: ['Validation failed : Invalid Mobile Format ({cn})']
};
break;
case 'Email':
@ -994,7 +994,7 @@ export class MysqlUi {
colProp.validate = {
func: ['isEmail'],
args: [''],
msg: ['Validation failed : isEmail ({cn})']
msg: ['Validation failed : Invalid Email Format ({cn})']
};
break;
case 'URL':
@ -1002,7 +1002,7 @@ export class MysqlUi {
colProp.validate = {
func: ['isURL'],
args: [''],
msg: ['Validation failed : isURL ({cn})']
msg: ['Validation failed : Invalid URL Format ({cn})']
};
break;
case 'Number':
@ -1016,7 +1016,7 @@ export class MysqlUi {
colProp.validate = {
func: ['isCurrency'],
args: [''],
msg: ['Validation failed : isCurrency']
msg: ['Validation failed : Invalid Currency Format']
};
break;
case 'Percent':

8
packages/nocodb/src/lib/sqlUi/OracleUi.ts

@ -838,7 +838,7 @@ export class OracleUi {
colProp.validate = {
func: ['isMobilePhone'],
args: [''],
msg: ['Validation failed : isMobilePhone']
msg: ['Validation failed : Invalid Mobile Format']
};
break;
case 'Email':
@ -846,7 +846,7 @@ export class OracleUi {
colProp.validate = {
func: ['isEmail'],
args: [''],
msg: ['Validation failed : isEmail']
msg: ['Validation failed : Invalid Email Format']
};
break;
case 'URL':
@ -854,7 +854,7 @@ export class OracleUi {
colProp.validate = {
func: ['isURL'],
args: [''],
msg: ['Validation failed : isURL']
msg: ['Validation failed : Invalid URL Format']
};
break;
case 'Number':
@ -868,7 +868,7 @@ export class OracleUi {
colProp.validate = {
func: ['isCurrency'],
args: [''],
msg: ['Validation failed : isCurrency']
msg: ['Validation failed : Invalid Currency Format']
};
break;
case 'Percent':

8
packages/nocodb/src/lib/sqlUi/PgUi.ts

@ -1610,7 +1610,7 @@ export class PgUi {
colProp.validate = {
func: ['isMobilePhone'],
args: [''],
msg: ['Validation failed : isMobilePhone']
msg: ['Validation failed : Invalid Mobile Format']
};
break;
case 'Email':
@ -1618,7 +1618,7 @@ export class PgUi {
colProp.validate = {
func: ['isEmail'],
args: [''],
msg: ['Validation failed : isEmail']
msg: ['Validation failed : Invalid Email Format']
};
break;
case 'URL':
@ -1626,7 +1626,7 @@ export class PgUi {
colProp.validate = {
func: ['isURL'],
args: [''],
msg: ['Validation failed : isURL']
msg: ['Validation failed : Invalid URL Format']
};
break;
case 'Number':
@ -1640,7 +1640,7 @@ export class PgUi {
colProp.validate = {
func: ['isCurrency'],
args: [''],
msg: ['Validation failed : isCurrency']
msg: ['Validation failed : Invalid Currency Format']
};
break;
case 'Percent':

8
packages/nocodb/src/lib/sqlUi/SqliteUi.ts

@ -802,7 +802,7 @@ export class SqliteUi {
colProp.validate = {
func: ['isMobilePhone'],
args: [''],
msg: ['Validation failed : isMobilePhone']
msg: ['Validation failed : Invalid Mobile Format']
};
break;
case 'Email':
@ -810,7 +810,7 @@ export class SqliteUi {
colProp.validate = {
func: ['isEmail'],
args: [''],
msg: ['Validation failed : isEmail']
msg: ['Validation failed : Invalid Email Format']
};
break;
case 'URL':
@ -818,7 +818,7 @@ export class SqliteUi {
colProp.validate = {
func: ['isURL'],
args: [''],
msg: ['Validation failed : isURL']
msg: ['Validation failed : Invalid URL Format']
};
break;
case 'Number':
@ -832,7 +832,7 @@ export class SqliteUi {
colProp.validate = {
func: ['isCurrency'],
args: [''],
msg: ['Validation failed : isCurrency']
msg: ['Validation failed : Invalid Currency Format']
};
break;
case 'Percent':

Loading…
Cancel
Save