CMD_JSON_VALIDATE to verify types before submission

Version 1.514


Command for ajax calls, to make validation checks before submission. This will save an invalid form post, causing the User to have to re-enter all their info again. type=user&value=fred type=domain& type=password&value=secretpass type=password&action=get #returns a new random password that passed the difficult password check type=dbname&value=dbname (exclude the username_ prefix) type=dbusername&value=dbuser (exclude the username_ prefix) Returns json with either: { "error": "some reason" } or: { "success": "" } or for random password generation (action=yes) { "success": "newrandompassword" } Note that the User and domain checks do use the Multi-Server Setup system, if it's enabled where it will check for external domains or username, if those options are checked. Similar to the functions: CMD_AJAX_CHECK_USERNAME CMD_AJAX_CHECK_DOMAIN CMD_AJAX_CHECK_PASSWORD

Interested to try DirectAdmin? Get a 30-day Free Trial!