Support the ongoing development of Laravel.io →
posted 1 year ago
0

I just found this:

https://stackoverflow.com/questions/37728580/convert-laravel-validation-rules-to-html-form-fields

I don't know why I didn't found it before. I think this could be made into a tool that then could be installed with composer to be used with laravel. But from my searches, it seems is not many people are talking about a function like this so much.

0

Your approach of generating form attributes based on validation rules is an interesting concept. It can help automate the process of generating HTML form inputs with the appropriate attributes derived from validation rules defined in Laravel.

Last updated 9 months ago.
0

Thanks a lot for your comment @victorpatrick . I'm glad to hear I'm not crazy for thinking so.

I haven't learn how I could make it into a tool that could be downloaded using composer, but even if I did there is two things that needed to happen before I do.

1.- There doesn't seem to be a lot of interest for a tool like this. 2.- I really don't know how many parallels could exist between laravel's validation rules and input attributes. Not to mention the extensive number of form controls that exists. Ideally I would want it to be as extensive as possible. For now, what I had been doing is adding conversions rules as I have step into them in my projects.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

arielenter arielenter Joined 11 Oct 2022

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.