Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Validation in Model
  • how can i use auto validation in models?
    i am defined validation rules in $_properties, but when i tried to save a record rules not be used
    except defining validation rules in $_properties, what should i do?
  • thank you for help
    i use validation observer and validation rules works fine
    but now i have another problem:
    i have a field called slug in a table that must be unique
    i have _validation_unique() function (like that have been written in docs) in my extended validation class
    and i defined validation rules in $_properties including unique rule and defined validation observer
    in _validation_unique() function i need to know current operation is inserting or updating
    if program is inserting a record i should check slug
    and if program is updating a record i should cancel checking
    how can i do this?
    thank you so much for spending your time and reading my unclear notes

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion