Fixed validation for unique fields... Though it could be improved a little (specially the type field of the validation)