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.050 seconds

I'm playing around with the new mvc and the FORK feature is FANTASTIC!!! it's saving me a lot of time! you are doing a very good job!!

Tomaselli (Forum)  

Get Started