Jump to content

Global Field for Validation before save


Bacos
 Share

Recommended Posts

Hi friends !

I'm intend to create a very complex website for a insurance company that will include very complex calculations and validation rules.

To achieve this, I've created a global field called "validation (textarea)", where I want to write php scripts for validation in the style Hanna Code. So, every single record that I will save (backend and frontend) should call the validation script before doing that.  

Is it possible with PW ?  Could you help me with a roadmap ?

Thank you all !

Bacos

Link to comment
Share on other sites

This is certainly possible, but should most likely not be done as part of the admin backend, but via modules. There are various point where you can hook into the core functions to inject your validation rules. The most obvious would be Inputfield(Name)::processInput or Pages::save. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...