I am using CI + smarty + dojo framework in my one application. I need some help. I have created the application using this three framework. it is woking fine. I just have one error. in my .tpl file the code if as follows.
<div id="dialogAddFactory" data-dojo-type="dijit.Dialog" data-dojo-props="title:'{$factory_lang_data[factory_lang_data].add_factory_info}'" onCancel="clearfactoryform();" style="display: none;">
<form dojoType="dijit.form.Form" id="frmadd">
{literal}
<script type="dojo/method"
data-dojo-event="onSubmit" data-dojo-args="evt">
if(this.validate()) {
insert_factory_dt();
return false;
} else {
return false;
}
</script>
{/literal}
<table>
<tr>
<td><label for="txtfactoryname">{$factory_lang_data[factory_lang_data].factory_name_label} </label></td>
<td><input type="text" required="true" name="txtfactoryname"
id="txtfactoryname" placeholder="{$factory_lang_data[factory_lang_data].enter_factory_name}"
dojoType="dijit.form.ValidationTextBox"
missingMessage="{$factory_lang_data[factory_lang_data].factory_name_is_empty}" /></td>
</tr>
<tr>
<td><label for="txtaddress">{$factory_lang_data[factory_lang_data].factory_address_label} </label></td>
<td><textarea id="txtaddress" name="txtaddress"
data-dojo-type="dijit.form.SimpleTextarea" rows="4" cols="25"
style="width: auto;"></textarea></td>
</tr>
<tr>
<td><label for="txtcity">{$factory_lang_data[factory_lang_data].factory_city_label} </label></td>
<td><input type="text" required="true" name="txtcity" id="txtcity"
placeholder="{$factory_lang_data[factory_lang_data].enter_city_name}"
dojoType="dijit.form.ValidationTextBox"
missingMessage="{$factory_lang_data[factory_lang_data].city_name_is_empty}" /></td>
</tr>
<tr>
<td><label for="txtstate">{$factory_lang_data[factory_lang_data].factory_state_label} </label></td>
<td><input type="text" required="true" name="txtstate" id="txtstate"
placeholder="{$factory_lang_data[factory_lang_data].enter_state_name}" dojoType="dijit.form.ValidationTextBox"
missingMessage="{$factory_lang_data[factory_lang_data].state_name_is_empty}!" /></td>
</tr>
<tr>
<td><label for="txtcountry">{$factory_lang_data[factory_lang_data].factory_country_label} </label></td>
<td><input type="text" required="true" name="txtcountry"
id="txtcountry" placeholder="{$factory_lang_data[factory_lang_data].enter_country_name}"
dojoType="dijit.form.ValidationTextBox"
missingMessage="{$factory_lang_data[factory_lang_data].country_name_is_empty}!" /></td>
</tr>
<tr>
<td><label for="txtpincode">{$factory_lang_data[factory_lang_data].factory_pincode_label} </label></td>
<td>
<input type="text" required="true" name="txtpincode"
id="txtpincode" placeholder="{$factory_lang_data[factory_lang_data].enter_pincode_here}"
dojoType="dijit.form.ValidationTextBox"
{literal}
data-dojo-props="regExp:'\\d{6}', invalidMessage:'{$factory_lang_data[factory_lang_data].pincode_is_invalid}'"
{/literal}
missingMessage="{$factory_lang_data[factory_lang_data].pincode_is_empty}!" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<div class="dijitDialogPaneActionBar">
<button dojoType="dijit.form.Button" type="submit">{$factory_lang_data[factory_lang_data].save}</button>
</div>
</td>
</tr>
</table>
</form>
</div>
Now it is workin file. but in pincode fild there is regular expresstion and invalidate message which is come from language file. it will validate the pincode too but it will not display the invalidate message which come from language file. it just display the
{$factory_lang_data[factory_lang_data].pincode_is_invalid}
The problem is you used smart variable inside {literal}
tag. Try replace the code above with this:
{literal}
data-dojo-props="regExp:'\\d{6}',
invalidMessage:'{/literal}{$factory_lang_data[factory_lang_data].pincode_is_invalid}{literal}'"
{/literal}