[Phpmyadmin-devel] Improved notification when attempting to insert invalid data.
Isaac Bennetch
bennetch at gmail.com
Tue Jul 29 19:32:59 CEST 2014
On 7/29/14, 8:16 AM, Chirayu Chiripal wrote:
> On Tue, Jul 29, 2014 at 1:32 AM, Isaac Bennetch <bennetch at gmail.com
> <mailto:bennetch at gmail.com>> wrote:
>
> Hi,
>
> On 7/28/14, 1:30 PM, Chirayu Chiripal wrote:
> > Hi,
> >
> > My GSoC task for this week is "Improved notification when
> attempting to
> > insert invalid data". I would like to know at which places
> validation is
> > required to be done?
>
> The idea here is basically that if a user attempts to insert data that
> will be truncated that we'll warn them. Some of this has already been
> implemented (for instance, try to insert the text "foo" to a column of
> type INT(10); the field turns red indicating a problem).
>
> This can be enhanced, though, for instance the following scenarios do
> not warn correctly:
> * Insert 999 to a TINYINT
> * Insert 99999999999 to an INT
>
>
> For integer types we can change our current input type="text" to input
> type="number" and specify a min and max value using attributes. Or, we
> still have to add a min and max value attribute and use
> Javascript/Jquery to validate the field when it loses focus or at keyup
> event.
I prefer a consistent experience for the user. Even though many browsers
would properly deal with input type="number", it will give different
feedback than our custom handling of, say, too many characters in a
varchar field. So I would like to be consistent and use our own tests
even for INT columns.
Note that in multibyte character sets, a single character may take
several bytes of data to store. I'm not sure whether it's easy to
correctly count bytes/characters in this case.
Another thought: we should allow the user to continue even if we don't
think the data they're entering is okay -- the input field should turn
red, but they should still be allowed to press the submit button and
allow MySQL to truncate.
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
More information about the Developers
mailing list