user5844: Hi i have noticed that you can get the unspent UTxOs in an wallet address using the Ledger. Constraints module. I want to know can I use it the same in the mkValidator as in the Endpoints?
The general form of the question is can I query the CLI node inside the validator, and make custom validation logic using the received information?

user6086: In short: no.
Validator has three arguments:

datum, from the utxo considered
redemeer, supplied in the tx
script context, which is a collection of data about the tx.

Nothing else.
Any information the validator needs must be supplied somehow in the arguments.
Some Ledger.Constraints can be used in validator logic.
(Here)
These are used in some of the examples provided. For example
https://github.com/input-output-hk/plutus-apps/blob/13836ecf59649ca522471417b07fb095556eb981/plutus-use-cases/src/Plutus/Contracts/MultiSigStateMachine.hs#L225

5844: <p>Hi i have noticed that you can get the unspent UTxOs in an wallet address using the Ledger. Constraints module. I want to know can I use it the same in the mkValidator as in the Endpoints?</p>
<p>The general form of the question is can I query the CLI node inside the validator, and make custom validation logic using the received information?</p>
 6086: <p>In short: no.</p>
<p>Validator has three arguments:</p>
<ul>
<li>datum, from the utxo considered</li>
<li>redemeer, supplied in the tx</li>
<li>script context, which is a collection of data about the tx.</li>
</ul>
<p>Nothing else.</p>
<p>Any information the validator needs must be supplied somehow in the arguments.</p>
<p>Some <code>Ledger.Constraints</code> can be used in validator logic.
(<a href="https://github.com/input-output-hk/plutus-apps/blob/46e831e49287c3a04f83497b9dd9e70718092cde/plutus-ledger-constraints/src/Ledger/Constraints/TxConstraints.hs#L42" rel="nofollow noreferrer">Here</a>)</p>
<p>These are used in some of the examples provided. For example
<a href="https://github.com/input-output-hk/plutus-apps/blob/13836ecf59649ca522471417b07fb095556eb981/plutus-use-cases/src/Plutus/Contracts/MultiSigStateMachine.hs#L225" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-apps/blob/13836ecf59649ca522471417b07fb095556eb981/plutus-use-cases/src/Plutus/Contracts/MultiSigStateMachine.hs#L225</a></p>
