127 Posts
Cappu
9 years ago
15
Topic

Hello,

I do have a User content type. - I want to validate the email to be requiered, to be a valid email string as well as to be available. - On 3 Validation I just can set Required and 1 Validation option. - Is there a way to add other validation rules to the field? What am I missing?

Thanks for any hint.

Kind regards, Bernhard

Get a VIP membership
4229 Posts
Kadministrator
9 years ago
2
Level 1

Hi,

I'm sorry but currently you can only attach one validation rule to each field.

127 Posts
Cappu
9 years ago
1
Level 2

Hi Klas,

ooh. - Please, add multiple validation rules on each field to your todo list, if possible. Thanks! 

Related to the email, maybe I discovered a bug. - If the email is already available I do get in the Frontend the following errors:

Fatal error: Cannot use object of type cpanelClass as array in ..../components/com_cck/controller.php on line 367

Any ideas?

Kind regards, Bernhard

85 Posts
kromoadv
9 years ago
0
Level 3

I agree.

Multiple validation would be really great...

9 years ago
8
Level 1

Hi Everybody,

With seblod you can add natively two validation rules "required" + another validation rule.

If you would like to add more that two validation rules, you can use your custom javascript code by using a "javascript code" plugin.

Regards,
Mehdi.

127 Posts
Cappu
9 years ago
7
Level 2

Hi Mehdi,

thanks very much for this valuable code. - Could you point us to an simple tutorial on how to add JavaScript, i. e. to verify an email -
and show an alert like Seblod standard validation is doing? - 

That would be a great help.

Kind regards,

Bernhard

9 years ago
2
Level 3

Hi,

Can you tell us which validations would you like to have on your email field?

Regards,
Mehdi.

127 Posts
Cappu
9 years ago
0
Level 4

Hi Mehdi,

Thanks very much for you response.

Besides required, it would be necessary to make sure it's a valid email (Contact email) and that the email isn't used in the system already (Ajax availablity).

Kind regards,

Bernhard

9 years ago
0
Level 4

Hi Mehdi, do you have that code snippet already? Can´t find an answer to this question?

The code snippet should include exactly that what Cappu asked for:

Check mailadress if it is valid and check if it is unused.

Thanks

548 Posts
joomleb
8 years ago
3
Level 3

Hi Cappu, 

Please, Did you find any solution here ?

127 Posts
Cappu
8 years ago
2
Level 4

No :-(

548 Posts
joomleb
8 years ago
1
Level 5

:( ...and, Have you input this into the Tracker as feature request ?

127 Posts
Cappu
8 years ago
0
Level 6

No :-(

9 years ago
0
Level 1

@Octopoos

+1 for multiple validation rules!

Should we file a feature request in the tracker for that?

@Cappu

good luck with implementing :-)

127 Posts
Cappu
9 years ago
0
Level 1

Hi gebeer,

well, I hope Octopoos is doing the implementation.

An example on how to use the JavaScript Code Plugin (see above) would fit for the moment, too....

Kind regards,

Bernhard

548 Posts
joomleb
9 years ago
0
Level 1

@Octopoos

+1 for multiple validation rules!

Many Thanks for Support :)

Get a VIP membership