Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Added MaxWords validation rule #18

Merged
merged 1 commit into from
Apr 26, 2020
Merged

Added MaxWords validation rule #18

merged 1 commit into from
Apr 26, 2020

Conversation

guiassemany
Copy link
Contributor

Hello! I added a validation rule to check for a max number of words.

I tried to do it so it will work with more charsets than the traditional str_word_count supports.

Thats why I used this: count(preg_split('~[^\p{L}\p{N}\']+~u',$value))

@mattkingshott mattkingshott merged commit 7328f22 into caneara:master Apr 26, 2020
@mattkingshott
Copy link
Contributor

mattkingshott commented Apr 26, 2020

Thanks! Added in v3.0.6 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants