cancel
Showing results for 
Search instead for 
Did you mean: 

Form Field Validation

hkır
Champ in-the-making
Champ in-the-making
Hi,
I extended alfresco model and added new mandatory field to cm:folder. Now I want to check the uniqueness of the entered value, while creating an new folder. For this purpose I tried adding a validation-handler in form-config.xml, but as I observed you don't use validation-handler for server-side validations (just used for regex and null checks). Besides async behavior of server requests frustrated all my attempts.

Can you tell me the best way of server-side validation of form fields? Thanks in advance for your help.
1 REPLY 1

hkır
Champ in-the-making
Champ in-the-making
Hi again,
I wondered how alfresco ensure the uniqueness of folder names and found out that formService does this. It checks this somewhere in TypeFormProcessor.internalPersist, hence not a good option for me.
If I customize form.post.json.js and make my server side validation before calling formService.saveForm function, would I be blowing it out of proportion?

Thanks in advance for your help.