Change valdiation logic,add widget