Closed (duplicate)
Project:
Field Conditional States
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2014 at 00:39 UTC
Updated:
9 May 2016 at 09:48 UTC
Jump to comment: Most recent
Comments
Comment #1
Tobias Xy commentedThis is actually a feature request: #2258933: Validation on form submit Drupal's States API doesn't provide any serverside validation, so this is the expected behavior so far.
But this feature could be added in a future version.
Comment #2
dodlhuat commentedDamn. Then this module is pretty much useless to me :( I'll try to get a validation up and running by myself.
Comment #3
Tobias Xy commentedComment #4
SchwebDesign commentedInteresting, this was my initially expected intention for this module at least with respect to the required field. If a field will be required, wouldn't you assume it'd also be ultimately required via validation? Shouldn't we reopen this as a bug or at least feature request?
Comment #5
Tobias Xy commentedYeah, I will work on this one as soon as I find the time for it. So setting it to active again.
Comment #6
SchwebDesign commentedVery nice thank you!
Comment #7
suydam commentedJust adding my thanks for looking at this, too.
Marking a field required doesn't really help if we cannot enforce it.
So as it stands we still need to code custom validation hook for any field we make required.
Comment #8
hass commentedThe most important feature I need too.
Comment #9
Nikdilis commentedSame to me - see: #2396685: Conditionally required fields are not required
Comment #10
Nikdilis commentedAs I already wrote in the linked post:
There are things that should be considered as pretty much basic (from scratch) when using "powerful" CMS like Drupal - this is definitely one thing! So I consider the validation (enforcement of required fields) to be a part of the states api in drupal. Otherwise the states api is pretty much useless itself. Will this be addressed at least in Drupal 8?
Comment #11
rooby commentedThis is not the place for questions about states API.
You'll need to open an issue against drupal core for that.
Comment #12
roball commentedSetting the state required to a field without treating that field to be required is pretty useless. If this is the "expected behaviour" due to Drupal core's States API, then the concept of this module is incomplete.
Tobias Xy, do you have a plan when to find time to look into this?
Comment #13
Nikdilis commentedPushed to Drupal 8:
#2405271: Conditionally required fields are not required
Comment #14
ryan.ryan commentedI'm wondering that if required/optional settings aren't actually respected in form validation then maybe the module should not even display them as options.
On one hand, I suppose they exist and sort of help by making a user think something could be required. But, that's not really a solution. Additionally, I suppose you could make something required by using client side validation, but that's implementing something custom and it doesn't help for making fields optional that are initially required.
I'm not saying I have a solution at the moment, but this certainly feels like more than a feature request as it's implicit in the UI.
Comment #15
roball commentedSorry about increasing the priority, but without having this fixed, this module is pretty useless.
Comment #16
brpubs commentedHas anyone found a solution to making the field actually required?
Comment #17
chowdhuriarijit commentedpatch is provided in this link https://www.drupal.org/node/2258933
Comment #18
chowdhuriarijit commentedComment #19
luenemann