Thread: Numeric control optionally allow null values [pgadmin4]
Hi,
Please find attached patch for numeric control with optionally allow null valuesNull values: undefined/empty string/null
By default numeric control value can not be null. Use flag allowNull: true to allow null values.
Usage:
id: 'fillfactor', label: '{{ _('Fill factor') }}', deps: ['index'],
type: 'numeric', group: '{{ _('Definition') }}', allowNull: true,
Attachment
Hi,
Please find attached patch for numeric and integer control with optionally null value support.id: 'fillfactor', label: '{{ _('Fill factor') }}', deps: ['index'],
type: 'int', group: '{{ _('Definition') }}', allowNull: true,

2] Numeric
id: 'fillfactor', label: '{{ _('Fill factor') }}', deps: ['index'],
type: 'numeric', group: '{{ _('Definition') }}', allowNull: true,

On Fri, Mar 4, 2016 at 10:55 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi,Please find attached patch for numeric control with optionally allow null valuesNull values: undefined/empty string/nullBy default numeric control value can not be null. Use flag allowNull: true to allow null values.Usage:id: 'fillfactor', label: '{{ _('Fill factor') }}', deps: ['index'],
type: 'numeric', group: '{{ _('Definition') }}', allowNull: true,
Attachment
Hi
--
On Fri, Mar 4, 2016 at 6:28 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
1] IntegerUsage:Hi,Please find attached patch for numeric and integer control with optionally null value support.id: 'fillfactor', label: '{{ _('Fill factor') }}', deps: ['index'],
type: 'int', group: '{{ _('Definition') }}', allowNull: true,
2] Numericid: 'fillfactor', label: '{{ _('Fill factor') }}', deps: ['index'],
type: 'numeric', group: '{{ _('Definition') }}', allowNull: true,
You've used regexps to validate numbers in this patch, however they assume that the only value number formats are (ignoring a leading -):
1234567 (integer)
1234567.89 (numeric)
However, this is only the standard in some countries - for example, a French user might write a numeric as:
1 234 567,89
Even in India that might be written as:
12,34,567.89
In Germany:
1.234.567,89
The numeric inputs should be validated based on the client's locale.
Thanks.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company