Do you create a test for each validation rule of each fields?

Posted 2 months ago by joshuajazleung

I was watching this video And jeffrey creates single test for each validation rule.

I am wondering if that's the standard way of testing validation rules? Say I have 10 fields and each field has 3 validation rules, that's 30 tests....

Would it be better if I create a test for each field? So only 10 tests in total?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.