Scala partial functions that give coincidence error: strange behavior

I'm trying to use a partial function for some validations, let's take an example of a string:

def isLengthValid: PartialFunction[String, Option[String]]= {
case s: String if s.length> 5 => Some ("Invalid")
}

def isStringValid: PartialFunction[String, Option[String]]= {
case s: String yes s == "valid" => Some ("Valid")
}

isLengthValid ("valid") oElse isStringValid ("valid")

Expected output => Some ("Valid")

But I'm getting a match error:

scala.MatchError: valid (from class java.lang.String)

Could someone help what is wrong here, because according to my understanding? .it defines It is called internally and should not be given. matchError.