I want to implement character limit on input by user on Single-Line text and Multi-Line Text fields. Please guide me.
2 Answers
You need just to assign a validation rule to your fields
The Sitecore field validators is a set of user-input validators that can be applied to either an item, a specific field type or a specific field on a specific item.
Sitecore comes with a set of standard validators, including broken links validation, email validators, max length validators and XHTML/W3C validation. You can find all validation rules at /sitecore/system/settings/validation rules
.
You apply rules to fields on individual items by selecting the field on a template to apply validation. Select the Validation Rules secion and select the rules to apply in the fields “Quick Action Bar” (applies validation to the left of the field), “Validate Button” (validation is run when clicking the Validation button on the Review tab), “Validator Bar” (applies validaton to the bar at the right of the fields) and the “Workflow” (applies validation when workflow is running).
More informations you can found here: https://briancaos.wordpress.com/2011/05/09/using-sitecore-field-validators/
hi you can crete custom sitecore field validators especially 'Max Length' validation rules under 'sitecore/system/settings/validation rules/' from the template '/sitecore/templates/System/Validation/Validation Rule'.
'Parameters' field should be like '[parameter]=[value]&[parameter]=[value]' i.e. like building a querystring. One of the parameter is result & it defines the default result value of a validation.
start implementing this custom validation rule to the item or __Standardvalues under field section 'Validation Rules'