conditional validating user's register input

Author Message

Jacek S

Wednesday 02 April 2008 3:30:07 pm

Im developing a webshop system and have to make custom users class with field validating based on other field selection. For example class contains fields:
- type, which contains two options: business and private
- value1, which must be filled when user choose private as type
- value2, which must be filled when type = business

How could I make a validator for checking such conditions in during user registration?

Piotrek Karaƛ

Monday 14 April 2008 9:26:28 am

Depending on the project constraints:

- develop a dedicated datatype, and store both the type and its value (there's plenty of space for that in the db)
- introduce two separate user classes

Each one will have its advantages.

Good luck,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.