add method validate

Add method validate to jQuery plugin