Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • Ferm
  • Ferm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 6
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.

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.070 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started