1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Sweden
    Posts
    11
    Vote Rating
    2
    lp1051 is on a distinguished road

      0  

    Default Unanswered: How to set validation on create/update

    Unanswered: How to set validation on create/update


    Hi!
    I couldn't find anywhere in docs if it's possible to say that validation rule (both for model or Row/CellEditing) should be applied only on creating record or on update. Have I missed something?
    Or what would be the way to go? Introduce some flag e.g in the grid and checking in custom validation function if the record is being created or updated?

    Thanks for any advice!
    Luk

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,074
    Answers
    673
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Can you explain this a little more? Are you trying to validate editors in a grid and determine of you are adding or updating the record?

    Scott.

  3. #3
    Sencha User
    Join Date
    May 2012
    Location
    Sweden
    Posts
    11
    Vote Rating
    2
    lp1051 is on a distinguished road

      0  

    Default


    Hi Scott,

    imagine two scenarios.
    1) using ordinary form and model validation of "Accept TOS" checkbox - this is typically validated only for creating new records
    2) in grid using Row/CellEditing plugin I have one text field which is required when inserting new record (for example: password), but not when editting (admin may or may not wish to change that field).

    So far I didn't find any configuration of validation rules for this or similar cases. Do you have any ideas?
    Thanks,
    Luk

Thread Participants: 1

Tags for this Thread