added isValid to basemodel