Sometimes a MySQL function can take in data that isn't of the type the column is, for instance with INET_ATON(127.0.0.1). This function is designed to insert to an unsigned INT column, but the validation feature sees "127.0.0.1" and feels it's not valid to insert and gives me the "Please enter a valid number" error message.
I think we should remove the validation in the presence of a function.
The same thing is done for input transformations.
I agree with Madhura's suggestion.
Isaac,
in the case you describe, I don't see "Please enter a valid number" but I do see the input field becoming red. Please confirm.
I'll attach a screen shot to make sure we're talking about the same thing.
We are talking about the same thing. Is this generated by phpMyAdmin or by your browser? The only place I see this generated by phpMyAdmin is in checkFormElementInRange() from js/functions.js, but this should not be called when inserting data.
I've tried two different browsers and done some quick debugging and I'm pretty confident the message is generated by phpMyAdmin js/messages.php line 764, PMA_printJsValueForFormValidation('number', __('Please enter a valid number')); Of course there's more to the mystery than that, but that's as far as I got at the moment.
I also do not believe checkFormElementInRange() is involved, but I'm not 100% positive of this.
Last edit: Isaac Bennetch 2015-06-13
Ok, I was testing the 4.4.8 milestone.
Ah, quite right, my mistake for missing that.
Should be fixed with
https://github.com/phpmyadmin/phpmyadmin/commit/84fa181135a83dd0b75b44f80edc69a5311fbb0c
but there might be other cases to discuss. For example, I'm not sure of the best behavior when choosing a function for a date.