MinWords

Checks if the number of words in the value equals or is greater than the given minimum

In your code

if(v::minWords('Lorem ipsum dolor sit amet.', 5)) {
  echo 'Yay, valid!';
}

In panel fields

fields:
  example:
    label: Example field
    type: text
    validate:
      minWords: 5