Validation On Custom Attribute

Permalink
I want to apply validation on custom attribute named (Verification Id) that only 10 should be entered.
I have applied Javascript but useless