Get defineFn working
Move validation code into xtype repo