validation

19 views
Skip to first unread message

zst...@googlemail.com

unread,
Jan 30, 2014, 4:40:41 PM1/30/14
to activejd...@googlegroups.com
Hello all!

Before asking questions, just want to say that project is really great... Keep a good work.

I have two questions regarding validation:

1. Is there a way (method) for pulling out all constraints including DB constraints?
Basically I would like to set constraints only on backend/DB side but would like to use this same constraints on front-end so validation can be done using JavaScript.

2. Is there a way of identifying what error message belongs to what input field?
I would like to display error messages below input field that is incorrectly filled so I need to identify what error message belongs to what input field.

Thanks in advance for answers/advices!

Igor Polevoy

unread,
Jan 30, 2014, 5:47:32 PM1/30/14
to activejd...@googlegroups.com
Hi, please see answers below. There is no straightforward answer to your question. 
From my experience, we decided to have validation either on front end or on back, but not both.

hope this helps


On Thursday, January 30, 2014 3:40:41 PM UTC-6, zst...@googlemail.com wrote:
Hello all!

Before asking questions, just want to say that project is really great... Keep a good work.

I have two questions regarding validation:

1. Is there a way (method) for pulling out all constraints including DB constraints?
Basically I would like to set constraints only on backend/DB side but would like to use this same constraints on front-end so validation can be done using JavaScript.

The ActiveJDBC philosophy is not to provide any feature that is offered by DB. As such, validations of ActiveJDBC have nothing to do with DB constraints. You may or may not have DB constraints, this is entirely up to you. If your DB allows to pull constraints, than you can do it, 

2. Is there a way of identifying what error message belongs to what input field?
I would like to display error messages below input field that is incorrectly filled so I need to identify what error message belongs to what input field.

Please, take a look at  the http://javalite.io/activejdbc_validations page. It is quite detailed, and explains how to use in web apps. 
You can also take a look at ActiveWeb examples:
Both have examples of using validation with ActiveJDBC. 

Stasha Zorjan

unread,
Feb 1, 2014, 5:00:58 AM2/1/14
to activejd...@googlegroups.com
Thanks for the answers/help and links to documentation and examples, there are all needed answers to my problems. 

Keep up the good work!

Cheers.



--
You received this message because you are subscribed to a topic in the Google Groups "ActiveJDBC Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/activejdbc-group/oxIwpXyeiXo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to activejdbc-gro...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages