I am looking for some clarification of validation rules.
My assumptions as I believe I understand things. I would appreciate if someone could tell me if I am right or wrong.
‘safe’:
Assign to all hidden values in a form
Do not assign to PK
Only applies during a massive assignment
‘on’=>‘search’ used for every value that a search may be performed on
‘unsafe’:
Can be used effectively in Scenarios to reverse a safe assignment
Only applies during a massive assignment
Now when it comes to setOnEmpty
I really don’t understand what the statement below means. Hence I really do not understand which attributes should be listed within it. Maybe someone can explain it different than the definition above?
I know that this is pre-populated during model generation but it does not seem to be assigning it to every db attribute that is assigned a default value. Shouldn’t it be though?
Yes sorry there are attributes there, I thought I mentioned that in the original question as they are automatically generated with the model creation. Sure enough I didn’t mention it though.
Does anyone have feedback in regards to safe/unsafe?
Assign to all hidden values in a form [also to attributes that should be massively assigned and don’t have other rules]
Do not assign to PK [correct for autoincrementing ones. But you may want a PK to be assigned if it is not autoincrementing. Note: better to have a validation rule for the PK.]
Only applies during a massive assignment
‘on’=>‘search’ used for every value that a search may be performed on
‘unsafe’:
Can be used effectively in Scenarios to reverse a safe assignment [or other validation rule]