Index

projects/ngx-persian/src/lib/JDate/ArithmeticUtils.ts

div
div(num1: number, num2: number)

This function returns integer part of division result of num1 and num2 numbers.

For example: div (10, 3) is equal to 3.

Parameters :
Name Type Optional
num1 number No
num2 number No
Returns : number
mod
mod(num1: number, num2: number)

This function return arithmetic mod result of two inputs as a integer.

Parameters :
Name Type Optional
num1 number No
num2 number No
Returns : number
round
round(x: number)

This function removes fraction part of the number if exists. So, for example, it will turn -145,455 to -145 and 145,455 to 145.

Parameters :
Name Type Optional
x number No
Returns : number

projects/ngx-persian/src/lib/Validators/persian-validators.ts

persianLettersValidator
persianLettersValidator(options: PLOptions, persianLetterService: PersianLetterService)

Reactive form validator that checks form control value contains only persian letters and allowed characters in the options parameter.

Parameters :
Name Type Optional Default value Description
options PLOptions No {persianDigits: false, whitespaces: false, symbols: false, enDigits: false}

see documents of isPersian method of the PersianLetterService for more info about options.

persianLetterService PersianLetterService No new PersianLetterService()
Returns : ValidatorFn
persianNumbersValidator
persianNumbersValidator(persianNumberService: PersianNumberService)

Reactive form validator that checks form control value contains only persian numbers.

Parameters :
Name Type Optional Default value
persianNumberService PersianNumberService No new PersianNumberService()
Returns : ValidatorFn

results matching ""

    No results matching ""