HI @NikitaTailor24 ,
Yes, you can implement a maximum character limit validation on a Multi Line Text Field in a Content Fragment Model (CFM) in AEM as a Cloud Service. Here are the steps to do so:
1. Open the CFM model in your AEM instance.
2. Navigate to the "Elements" tab in the CFM editor.
3. Find the "Multi Line Text" element and click on it to edit its properties.
4. In the "Validation" section, click on the "Add" button to add a new validation rule.
5. In the "Validation Rule" dialog, set the following properties:
- Rule Type: "Custom"
- Name: "Max Length"
- Description: "Maximum character length validation"
- Function: "function (value) { return value.length <= 100; }" (replace "100" with your desired maximum character length)
6. Click on the "Save" button to save the validation rule.
7. Save the changes to the CFM model.
After following these steps, the Multi Line Text Field in your CFM model will have a maximum character length validation of 100 characters (or your desired length). When a user tries to enter more than the allowed number of characters, they will see an error message indicating that the input is too long.