Access DAO object in Constraint script

Hello All,

It seems it's not possible to access DAO objects in a Constraint validation script. For instance, when I try to validate using objectDAO.findByCode(input.myCode, 0, 1), I get the following error:

objectDAO is neither defined in the script nor in dependencies.

Is it so or am I doing something wrong? And if so, what alternative is feasible to validate input data against BDM (database) values?

Thank you in advance.