25 Aug 2011 3:06 AM #1
Unanswered: Validating data Model Firebug returns validate is not a function
i'm new to ExtJs and have a problem with validating a model which i'm using for a Grid. I've already searched the web but couldn't find an answer ...
The theoretic way i'm doing it is that i define my model putting this to a data Store and that store i'm using for my grid.
In the grid i use the celleditings event edit on which i tried to retrieve the model to validate it but all i tried didn't work and Firebug always said validate() is not a function.
Anybody an idea what could be the reason for my problem?
27 Aug 2011 7:56 AM #2
It would be easier to help if you posted some code.
Instances of models are known as records. Chances are that the record you are retrieving is not actually a record at all, hence the method is missing. Try adding some logging just before you validate it to confirm that everything is what you think it is.
console.log(record); console.dir(record); console.log(record.validate);