Lack of interest Validate Values for Group of Options

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

LiquidPro

Active member
I think it would be pretty valuable to be able to validate an entire group of options. There are some sitautions which an option cannot be validated by itself, it depends on values of the other options. The example I currently have is database information. I am writing an add-in that will use another database, and I can't validate the options (host, port, username, password, database) because I can only validate one field at a time. My suggestion would be when you create the group of options, be able to enter the validation class/method on that screen.

Does that make sense, or am I off my rocker?

Thanks!
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
It sounds like you should be putting all of those elements into a single option instead.
 
My only practical option to put them all in one option would be to create a Zend_Config object, which having a user enter something like the information below doesn't seem to be very user friendly. Then I not only have to worry about them entering valid information, but also using proper syntax.

Code:
<?xml version="1.0"?>
<configdata>
   <database>
       <adapter>pdo_mysql</adapter>
       <params>
           <host>db.example.com</host>
           <username>dbuser</username>
           <password>secret</password>
           <dbname>dbname</dbname>
       </params>
   </database>
</configdata>
 
Have a look at the emailTransport option, as an example of a complex option. For validation of an option, see spamThreadAction. You should be able to setup a complex option with validation as you need.
 
Top Bottom