Hi, KK! Bug report (probably) here.
While using db_persist_form, mode='create', a page is successfully created even if required dropdown editable is not properly set. Technically, a dropdown is already set to default value - i.e. '-' or whatever is default.
In backend I choose this created page and, of course, it is not possible to save this page because dropdown is not set correctly. This is normal, just like it should be with db_persist_form. So, if some dropdown is not set properly, an k_error should be generated and page should not be created in backend with db_persist_form. Let me know if this is nor clear.
For curious minds, if a dropdown value should be decimal, then it is possible to create default value as a '-', and provide validator='decimal'. But this is obviously a hack and is kinda not obvious for the rest folks.
Best regards
While using db_persist_form, mode='create', a page is successfully created even if required dropdown editable is not properly set. Technically, a dropdown is already set to default value - i.e. '-' or whatever is default.
In backend I choose this created page and, of course, it is not possible to save this page because dropdown is not set correctly. This is normal, just like it should be with db_persist_form. So, if some dropdown is not set properly, an k_error should be generated and page should not be created in backend with db_persist_form. Let me know if this is nor clear.
For curious minds, if a dropdown value should be decimal, then it is possible to create default value as a '-', and provide validator='decimal'. But this is obviously a hack and is kinda not obvious for the rest folks.
Best regards