Hi,
Is there plans to introduce D8 version of this module?
We (@InternetDevels team) would like to help you with development of this version.
Thanks, ksis.

CommentFileSizeAuthor
#23 webform conditional extra lines.png47.34 KBpetednz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

I would like there to be. Of course, it will depend on a D8 version of Webform. As well, there is overlap between Webform Validation and Field Validation. We've started the conversation about working together for D8 in #1890308: [meta] Work together with Webform Validation module.

Liam Morland’s picture

Category: Support request » Feature request
Shawn DeArmond’s picture

There is now a version of Webform, based on YAML Form.

gusans’s picture

hi! I'd like to know if there is any advance on this port or any alternative to have fields validation on webform 5.x
thanks in advance!

Liam Morland’s picture

There has not yet been any work on this.

Sam152’s picture

Issue tags: +bccd8

I've commented on using the field_validation module here: https://www.drupal.org/project/field_validation/issues/1890308#comment-1...

I think it'd be worth investigating with a prototype to see if the entity constraints and validation system provides enough flexibility to work with all of the webform features. I suspect there would be gaps that would need to be filled which wouldn't be appropriate for a general purposes entity validation/constraints UI. At this point I do think 'webform_validation' would still be a good stand-alone project to service the use-case it had for D7.

Possibly have some capacity to help contribute to answer these questions and contribute to a port in the future.

Liam Morland’s picture

Status: Active » Closed (duplicate)
Related issues: +#2220971: Drupal 9 version
imclean’s picture

A duplicate of itself? Is the field_validation issue the one to follow?

Liam Morland’s picture

Status: Closed (duplicate) » Active
Related issues: -#2220971: Drupal 9 version +#1890308: [meta] Work together with Webform Validation module

Sorry, I must have confused it with something else.

malcomio’s picture

This would be useful for a project I'm working on. I've made a start at https://github.com/malcomio/webform_validation, but it's in a very early state.

thiagogomesverissimo’s picture

Guys,

This module https://www.drupal.org/project/webform_extra_field_validation/ has the same idea of webform validation, but implemented in Drupal 8.

Maybe we can merge both.

What do you think?

Liam Morland’s picture

Sure, I'd like to use existing code and bring in others who are interested in working on this.

@malcomio What is the status if your code? Does it have basic functionality? Did you look at the Drupal core/Symfony namespace Symfony\Component\Validator? Perhaps some of the classes there could be useful.

Liam Morland’s picture

There are two pre-release ports of webform_validation to Drupal 8:

I would like to have a discussion about which should be the basis for the new version. How ready is your code? Perhaps each of you can look at the others' code and give your thoughts. What features does each have that the other is missing?

malcomio’s picture

I didn't make very much progress at all - it almost certainly makes more sense to start from https://www.drupal.org/project/webform_extra_field_validation

Liam Morland’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Category: Feature request » Task

I have started a 8.x-1.x branch based on the webform_extra_field_validation module by arghajit.lodh.

petednz’s picture

so seem there are now

- webform_extra_field_validation alpha2 (22 sites at 11 March)
- webform_validation alpha1 (317 sites at 11 March)

I am not sure what the nuances are between the two or what is recommended at this point to avoid spending time assessing both?

but i guess i give this one a shot first.

thanks for everyone's time getting things this far

petednz’s picture

I appreciate this is not the best place for this comment, but thought for other's benefit I would just document what i observed when i enabled this module. When editing an Element just below the Form Validation section there is a new section called

Form Extra Validation
- Equal Values
- Some of several

Liam Morland’s picture

The current version, webform_validation 8.x-1.0-alpha3, is developed on top of webform_extra_field_validation 8.x-1.0-alpha2. Development will continue; patches welcome.

Liam Morland’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
AdamEvertsson’s picture

Hi guys.

Awesome work on an awesome module. I (nor my clients) couldn't live without it. I'm migrating to Drupal 9 in a while (from Drupal 7) so I wonder if this module will be more than a .dev anytime soon? If not I need to find an alternative....

// Adam

Liam Morland’s picture

I don't expect to have much time for this for a while. Does it currently work well enough to be released?

Liam Morland’s picture

Title: Drupal 8 version » Drupal 9 version
petednz’s picture

I think there is a major issue at this point that if you edit a webform component in the build UI (and don't select any of the extra validation because none is required) then when saved the field gets a whole bunch of additional lines like this in the source/yaml

on a big form this means a lot of extra lines that seem superfluous are added, making tweaking via Source much more painful.

I had hoped we could provide a fix for this but the person who was looking at this is no longer available so just reporting it for now. hopefully we can get some extra capacity for this soon but meanwhile wanted to report. (r26496)

Liam Morland’s picture

@#23: Thanks for the report. It may be that the defaults need to be NULL to avoid having it store these extra values.

petednz’s picture

Thanks for suggestion. i will take a look

petednz’s picture

@liam-morland

Maybe i mis-read - do you mean 'maybe the code needs fixing to ensure that defaults have a NULL value', or 'when building your form you need to ensure you set default to be NULL'?

Liam Morland’s picture

I mean that something in the code may need to be changed.

Liam Morland’s picture

Liam Morland’s picture

I have done a bunch of work on this. Testing is appreciated.

I would also welcome a patch to add automated tests. Having automated tests would speed up development. (Currently, there is only a stub test which does not actually test anything more than that that module installs.)

Liam Morland’s picture

Status: Active » Fixed

An alpha release is available. Testing of the latest development version will help move this towards full release. Further work will be tracked in the issue queue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.