Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Validation of integer fields always on

Validation of integer fields always on 06 Jan 2016 11:47 #13763

  • Ferm
  • Ferm's Avatar
  • Offline
  • Junior Member
  • Posts: 39
  • Thank you received: 6
  • Karma: 2
If you add a normal integer to a table and don't specify any validation, the XML file for the form will still contain the line

validate="numeric" for that integer field.

In many cases, this is not a problem. However, if, for example, the form for creating a new record does not contain the integer field but another form for the table does, Joomla will run the validation rules when you create a new record and the integer field will generate an error (as it is NULL as it was not on the form)

J-Cook allows you to manually specify that an entry needs to be numeric. Therefore I think it would make more sense to not have any valuation unless you specify it manually. In particular as you see a message in J-Cook saying "Validation is not enabled" unless you specify something.
The administrator has disabled public write access.

Validation of integer fields always on 10 May 2016 20:08 #13945

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
FIXED

I don’t know why do you want to avoid the validator, but I think it is ok. Once you have instanced the field, just uncheck the validator, and then Cook will not integrate as fallback.
Same for time, or date time. You can now remove them from the builder without any fallback.

I just see a small bug is when you instance a integer field int the table, the validator is not set in the properties. Once you refresh the page, it will appear. At the moment I will not fix that one because it is little bit tricky at the moment. (I know why, but it is long structural rewrite, so I will fix it later. Just a UI issue).
Coding is now a piece of cake
Last Edit: 10 May 2016 20:08 by admin.
The administrator has disabled public write access.
Time to create page: 0.061 seconds

Get Started