Frontend? You can implement it in a shared library and cross compile. Or implement it in a DSL and interpret (or compile) that for each target platform.
Is that overkill? Then implement the bits (it's almost always a subset) you need in the frontend.
Don't like that but your app can assume an internet connection? Then keep a connection open (i.e. Signal R) and call procedures on the server.
I don't trust the article author to understand this based on the choices made.
It is a good example to bring up because front end validation is not business logic, it is presentation logic. For some simple use cases that might not be obvious to many people but let's just consider a sign up form accepting an email address and a password. There definitely validations you want to perform in both places - the password needs to be 10 characters and have at least 3 of numbers, uppercase, lowercase, and special characters. Those exact password validations will be the same in both the UI and API. But let's consider the email. The business rule here is that only deliverable emails that are openable by the person signing up should be accepted for new users. You cant validate that on the front end. The best you can do is check for an @ symbol or run a more complicated regex (whales be there) before passing it off to the backend to actually send an email, encode signup details into a special link, and do all the work necessary to satisfy the business rule.
Its trivial to further drive that point home that UI validations are not business logic even when the same validation appears as part of business logic. You do some minimal checks to save the user time on the UI, but those shouldn't even be looked at as validations. They should be thought of as affordable for the user to prevent wasting their time with trivial, predictable errors.
The unfortunate truth is that our industry is full of examples where people have done exactly this. With predictably bad results.
Say I have a web application, written in JS running in the client browser. It uses the REST API.
I also need an Android app.
Does the Android app use the same REST API? If so, is the business logic re-implement both in the front end web JS code and inside of the Android app?
Or is the business logic embedded in the API?
If the rest API is pure, it will provide low-level CRUD operations with minimal business logic. The business logic will need to be written in each frontend. Making sure the business logic is correct and in sync across the front ends becomes a challenge.
If the business logic is embedded in the API, then many of the API endpoints will be less REST and more RPC style. But then the utility of Django REST framework is diminished.
How would you navigate this?