Testing Length Validation in Laravel

I thought it might help people new to the Laravel framework and testing, to walk through how to test length validation. When I say length validation, I mean the constraints of length that you might want to put on a string field.

For example, let’s say that we wanted to limit the length of a user’s real name to 50 characters; or if we restrict the email address to the database column length of 255. Along with the database constraints, we should add validation constraints to the controller when creating and updating records.

Visit Laravel News for the full post.

The post Testing Length Validation in Laravel appeared first on Laravel News.

Source: Laravel News