check if textfield is empty java code example
Example 1: testing if editText is empty java
if (TextUtils.isEmpty(editText.getText().toString()))
{
Toast.makeText(MainActivity.this,
"Empty field not allowed!",
Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(MainActivity.this,
"Proceed..",
Toast.LENGTH_SHORT).show();
}
Example 2: django check if model field is empty
Frame.objects.filter(asset_id__isnull=True)