Question about AutoValidation and Posting data


Active member
I have a system where I have something like:

I keep getting errors like this The field '' was not recognised.

I would like to know how I can do this and do it right. The thing is that is from one DataWriter where the other two are from another two data writers. I also have some fields that are NOT part of the datawriter and are handled prior before saving such as total members and the amount which is calclated right before its saved... Well it doesn't have a field name The field 'cost_per_member' was not recognised.

Any idea on how I can do this?


Active member
I am using Beta 3, but this has nothing to do with 'custom fields' this is fields that i am using for a different system :) I can start a conversation if need to be since some of this is private related.


Active member
the question i have is does those fields get write to sql? because some of those fields are not database based...


Active member
Here is a good example of the situtation I am having.

You see I have "Trip" and "Trip Locations"

Now a Trip Location has it's own DataWriter, and Trip has it's own as well, but the problem is I want to be able to validate one trip location which is added prior to creation of the first trip. Then when created they can add more trips... Now there may be a chance where I want multiple trips added at the time of creating a trip. Now I am not sure how about to do this...

I've noticed that in User there are many different list of xf_user stuff but those seem to be linked to each other and is required...

So how would I go about doing this for multiple locations and validating them???


Well-known member
If your field is not in database, you should opt out it from AutoValidation.
If you still want to validate it somehow (check for locations before trip etc), you will need to do it in the DataWriter using _preSave(). You can throw an exception and user will see that as an error message.

Hope this helps.