Chained Validation

Chained Validation

rainolfrainolf Posts: 56Questions: 6Answers: 0

Hi,
is there the possibility to add multiple validation steps?
like:
Field::inst( 'meeting_id' ),
->validator( 'Validate::notEmpty' )
->validator( 'Validate::numeric' ),

Seems not correct in this way.

How to achieve this?

Thank you

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    In Editor 1.3 you would use:

    ->validator( 'Validate::numeric', array(
      empty: false
    ) )
    

    See the PHP validation manual page for information on the validation options.

    In Editor 1.4 you will be able to chain validation methods.

    Allan

  • rainolfrainolf Posts: 56Questions: 6Answers: 0

    Is there am easy way to verify which version i have?

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    On the console $.fn.dataTable.Editor.version;. That assumes that you update the PHP libraries at the same time as your client-side libraries :-).

    Editor 1.4 should be at the start of next month. 1.3.3 is the current release.

    Allan

  • rainolfrainolf Posts: 56Questions: 6Answers: 0

    ok
    thank you

This discussion has been closed.