Jump to content

disable validateService() on order form


Blesta Addons

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.

 

.

Link to comment
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 .

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...