Open Address Ninja from Apps in your Shopify admin. On the home page, click Require apartment/suite numbers. In the Countries card, choose All countries, Only these countries, or Except these countries. Add countries with the Search countries field. Click Turn on. If you changed the countries, the button reads Save and turn on. To change the error message, open the Error message card.
The rule checks the second address line only when a customer fills it in. Make the second address line required under Settings > Checkout in your Shopify admin so customers always see the error message.
Originally from our Help Center