function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ikamsfikamsf 

type email for <apex:input>

The documentation says that type="email" is available to use for <apex:input> when the field is not a salesforce standard object. That is exactly the case for me and I have the code below, but I am getting the error message: Unable to validate type 'email': data type not provided.

This link says email is a valid type:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_input.htm
Could somebody please help? Thanks.

 
<div class="form-group">
                            <apex:outputLabel for="inputEmail" styleClass="control-label">Email</apex:outputLabel>
                            <apex:input type="email" styleClass="form-control" id="inputEmail" html-placeholder="Email" html-data-error="The email address is invalid" required="true">
                            </apex:input>
                            <div class="help-block with-errors"></div>
                          </div>
                     
                      <div class="form-group">
                        <button type="submit" class="btn btn-primary">Submit</button>
                      </div>


 
Antonio ManenteAntonio Manente
You may not have to associate it with a salesforce object, but you have to associate it with something. I'm fairly certain this error comes because you have not binded it to a variable in your controller of a comparable data type. This is from the documentation for an input component: 
 
The type specified must be compatible with the data type of the sObject field or controller method or property return type, or it will generate a compiler error when the page is saved. If you don’t set a type for an <apex:inputField> component, it defaults to its standard smart behavior. If you don’t set a type for an <apex:input> component, it defaults to “text”.