refactor: revise validation messages

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
This commit is contained in:
Wing-Kam Wong
2022-02-05 15:17:30 +08:00
parent 97ed3b5498
commit 58bd645b69
10 changed files with 40 additions and 40 deletions

View File

@@ -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'