Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Create a custom validation for a doctype data field

Dears,
I would like to create a doctype where some fields need to follow a certain pattern. I thougt about a validation system and it seems that such system already exists for Data fields: emails, phone, … (https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/articles/field-types#data)

I would like to create my own validations with regex.

Is it possible ? How should I do?

Thanks

Regards

I used a Controler method: validate()