Abide Validation

Abide Validation

cbtdevcbtdev Posts: 39Questions: 12Answers: 0

Do you know if there are plans to incorporate Abide client-side validation (Abide is part of the Foundation library)? To give some perspective, our application already has server-side validation, so the PHP validation that is provided with Editor is unnecessary for us. As far as client-side validation goes, it seems that the only option is to use the preSubmit event. For our non-Editor forms, we have found that the Abide validation is a nice and clean alternative to writing clunky javascript validation.

Any help would be greatly appreciated!

Thanks,
Kurt

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Hi Kurt,

    Currently there is no plan for that to be built into Editor. Editor focuses on server-side validation since validation must be done at the server-side, regardless of any validation performed at the client-side.

    Having said that - improved client-side validation options (most likely a hook to run custom validation methods) is something I'm very much planning for the next major release of Editor (1.6 - no time scale yet).

    I haven't looked into Abide much, but it should be possible to have it operate on the preSubmit event I would think. Is that an option you've looked into?

    Regards,
    Allan

  • cbtdevcbtdev Posts: 39Questions: 12Answers: 0

    Hi Allan,

    Thanks for the quick reply. The preSubmit would certainly work for hooking into the 'on valid' event of Abide. However, in order for that to work, the form needs to be created with a data-abide attribute and each field can be given predefined patterns and/or types (i.e. required, email, number, date, etc.). We were thinking that it would be nice to just configure these through the editor.field options.

    I think what we might do for now is hook into the initComplete or open and add our attributes there and then use the preSubmit to invoke the validation.

    Thanks again for your help!

    Kurt

This discussion has been closed.