Jump to content
Sign in to follow this  
Blesta Addons

disable validateService() on order form

Recommended Posts

in some case, we don't want to pass the validate services function for the order form or when service status is pending, we need it only when activating service .

Real case :

in some cases, we need only to accept order, then the admin activate the order with filling the service fields data,  only then we want to allow module/service to validate the entered data.

 

.

Share this post


Link to post
Share on other sites
4 hours ago, Tyson said:

Creating a service without validating the service first sounds like a logical mistake. If your module does not need to validate the service you could have it always return true from it's validate method.

maybe i have made i wrong explanation, we don't want to add service without validation, we want only to collect order from client without validation (order form) maybe a new settings in modules or order form!!!

the validation will pass in service creation . i see logical to have validateService() inside add service, but i see it would be also a logical to validate data or not in the order form. in my case i have resolved it with some modifications, but i think this can help others if implemented in the core .

 

Share this post


Link to post
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
Sign in to follow this  

×