class ParameterFormData extends ParameterNoBody {

    @Override
	public void validate() throws APIRestGeneratorException
	{
    	String errorString = null ;
    	
    	if (ConstantsCommon.TYPE_FILE.equals(this.getType()) 		  	  &&
    	   !this.consumes.contains(ConstantsInput.CON_MULTIPART_FORM_DAT) && 
    	   !this.consumes.contains(ConstantsInput.CON_APP_X_WWW_FORM_URL))
		{
			errorString = "The 'name' field (with the value '" + this.getName() + "') needs some (or both) of the following types in the consumes definition: "  + 
						  ConstantsInput.CON_MULTIPART_FORM_DAT + ConstantsCommon.STRING_COMMA + ConstantsCommon.STRING_BLANK + ConstantsInput.CON_APP_X_WWW_FORM_URL ; 
		}
    	else if (this.getType() == null)
		{
			errorString = "The 'name' field (with the value '" + this.getName() + "') needs a 'type'" ;
		}
    	else if (this.isAutoInjected())
		{
			errorString = "Auto Injection is not implemented for form-data parameters" ;
		}
		
		if (errorString != null)
		{
			ParameterFormData.LOGGER.error(errorString) ;
			throw new APIRestGeneratorException(errorString) ;
		}
    }

    public  ParameterFormData(final String name,
							 final String alias,
							 final String description,
							 final String required,
							 final String type,
							 final Set<String> consumes,
							 final String autoInjected);

}