User tests: Successful: Unsuccessful:
Numerous options in the plugins and templates are for numbers but the xml field type is text. This pr changes them to the correct value of number.
This ensures that a user cannot enter a letter and only numbers. There are no b/c issues as only a numerical character could ever have worked and there is no change in the way the data is stored.
I spotted this when debugging a user's site where they put "five" in the count field instead of "5" and wondered why it didnt work. After this PR that isnt possible
Category | ⇒ | Front End Plugins Templates (site) |
Status | New | ⇒ | Pending |
filter="integer"
is server side handling (and typecasts the value as an integer versus the default string). The class on the other hand I'll leave to whomever understands whatever the validation logic is in the client side stuff.
Well, if we had a data handling layer in the form API that would automatically do conversions then I'd agree with you, but we don't have that so...
While I agree i think it is beyond the scope of this PR for the reasons I mentioned before
Labels |
Added:
?
|
I have tested this item
Code review.
@brianteeman @infograf768 can you please look if this PR is related to #15020 as @Quy asked above?
the changes proposed there are beyond the scope of this pr. If after this one is merged the other changes from that pr are still required then it can be merged once the resulting conflicts are resolved
thanks @brianteeman, will test now.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-27 13:30:43 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
thanks
In which case you can probably remove
filter="integer"
andclass="validate-numeric"