0

I have used following code in my VF

<apex:pageBlockSectionItem > 
<apex:outputLabel value="!$ObjectType.C_FormObject__c.fields.C_Item_SL_JapaneseVisaApply__c.label}" />
<apex:inputField value="{!oFormobject.C_Item_SL_JapaneseVisaApply__c}" required="true" > </apex:inputField> 
</apex:pageBlockSectionItem>

But when i submit my form it throws validation error even it has value. enter image description here

0

I know this is a bit stale. I just ran into the same issue and found that if I removed docType="html-5.0" I was able to successfully submit it.

Two examples - this one fails:

<apex:page standardController="Case" docType="html-5.0">
    <apex:form>
        <apex:pageBlock>
            <apex:actionRegion>
                <apex:inputField value="{!case.multiselect__c}" required="true">
                    <apex:actionSupport event="onchange" rerender="fields" immediate="true"/>
                </apex:inputField>
            </apex:actionRegion>
        </apex:pageBlock>
        <apex:commandButton action="{!save}" value="Save"/>
    </apex:form>
</apex:page>

This one passes:

<apex:page standardController="Case">
    <apex:form>
        <apex:pageBlock>
            <apex:actionRegion>
                <apex:inputField value="{!case.multiselect__c}" required="true">
                    <apex:actionSupport event="onchange" rerender="fields" immediate="true"/>
                </apex:inputField>
            </apex:actionRegion>
        </apex:pageBlock>
        <apex:commandButton action="{!save}" value="Save"/>
    </apex:form>
</apex:page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.