validation rule and form made at Form Builder

Laraship QuestionsCategory: Technicalvalidation rule and form made at Form Builder
nao asked 6 years ago

I have a question.

Can I apply validation rule for form made at Form Builder?

If yes, how do I do?

At rules() function of class extended BaseRequest, developer can set original rules for input form.

This rules is applied when input form is coded at create_edit.blade.php file.

At create_edit.blade.php, deloper can embed form made at Form Builder.

I hope embed form to apply validation rule, too.

2 Answers
laraship Staff answered 6 years ago

Hello,

Standard validations are already there, like Required, Number, Email, Date. can you please specify the validation you are looking for

nao replied 6 years ago

For example, input item is password, I hope to apply rule ‘confirmed|max:24|min:8’.

laraship Staff answered 6 years ago

Hello, Currently this feature is not available but we can build it for you if you are interested

nao replied 6 years ago

If your company build this, how much will it cost?

laraship Staff replied 6 years ago

It will be 4~6 hours which is $100

nao replied 6 years ago

I send email about tis matter later.

laraship Staff replied 6 years ago

Hello, we haven’t received any email

nao replied 6 years ago

I’ve examined source of embed form.

In embed form, the value of form action attribute is like below:
https://domain/forms/ABC12345

While, in form like User module, the value of form action attribute is like below:
https://domain/users

If the value of form action attribute of embed form can change “https://domain/forms/ABC12345” to “https://domain/users”, the process of embed form can pass store() or update() function of Controller class, and validation rules can apply.
Each items of embed form don’t need validation rule.
Instead, text field which input the value of form action attribute will need.

In this time, if your company add or modify code of Form Builder, can you achieve above my idea?